Skip to content

Conversation

@yiheng
Copy link
Contributor

@yiheng yiheng commented Sep 9, 2016

No description provided.

@yiheng yiheng merged commit 07653d3 into intel:master Sep 9, 2016
@jason-dai
Copy link
Contributor

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).

@yiheng
Copy link
Contributor Author

yiheng commented Sep 9, 2016

Let me create a issue to log this.

@jason-dai
Copy link
Contributor

jason-dai commented Sep 12, 2016

Please remove torch.scala, and move all the factory methods from object torch to object Tensor

var error = nextError
while (i > 0) {
val input = modules(i - 1).output
error = modules(i).backward(input, error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we call each module's updateGradInput here? And then we also need to implement the updateGradInput method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In some special case, some module will override backward instead of updateGradInput, to do something beyond updateGradInput and accGrad(for most modules, these two operations are enough in backward).

So the container call backward.

i8run referenced this pull request in i8run/BigDL Jan 26, 2018
@LeicongLi LeicongLi mentioned this pull request Feb 19, 2019
yangw1234 added a commit that referenced this pull request Nov 25, 2021
* add github action for nano code style (#1)

* Update nano-style-check.yml

* Test pr (#2)

* change something

* make style break

* Update nano-style-check.yml

* Update nano-style-check.yml (#3)

* Update nano-style-check.yml

* Update nano-style-check.yml

* Update nano-style-check.yml

* Update nano-style-check.yml

* Update nano-style-check.yml

* Update nano-style-check.yml

* fix style

* change nane
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants