-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Module:backward() final #25
Comments
A similar one need to be final: #966 |
Forward and backward should be final for all non-container layers. The non-container layer should only override updateOutput(), updateGradInput() and accGrad(). Some common logic(e.g. bypass the layer/freeze the parameter) should be put into the forward/backward method and not be changed by the non-container layers. Forward/Backward should be overridden in container layers. In container forward/backward method, the submodules should always call forward/backward method of the submodule. |
* fix: wrong usage of omp_get_num_threads. omp_get_num_threads will return how many threads in current team. For sequential code, it always return 1. In mkl.c, it's a sequential mode. There are two ways to solve this: 1. get the value in a parallel mode 2. call omp_max_num_threads * test: add test case
* add scala object detection api and examples
* update setup.py * add new action * add compatible mode
We should make
Module:backward
final, and overload theupdategradInput
andaccGradParameters
methods in its subclasses instead.The text was updated successfully, but these errors were encountered: