Skip to content

Use factory methods to create layers instead of calling the constructor directly #3

@yiheng

Description

@yiheng

When defining a model, instead of directly calling the constructors of individual modules, we should use factory methods (e.g., through Scala companion object’s apply methods). This allows one to define the same model that can run using different underlying engine (e.g., MKL-DNN).

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions