Skip to content
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

Double backward #490

Merged
merged 10 commits into from Jul 22, 2019

Conversation

@TE-KazukiYoshiyama
Copy link
Contributor

commented Jul 19, 2019

We support the double backward, i.e., the second-order gradients of outputs with respect to inputs like

grads = nn.grad(outputs, inputs)

# Manipulate {grads} as usual variables. 

Have a look at the documentation for details after the release.

Currently, the following functions support the double-backward.

  • abs
  • absolute_error
  • add_scalar
  • add2
  • affine
  • average_pooling
  • batch_matmul
  • batch_normalization
  • binary_cross_entropy
  • broadcast
  • categorical_cross_entropy
  • ceil
  • celu
  • concatenate
  • convolution
  • crelu
  • deconvolution
  • div2
  • dropout
  • embed
  • epsilon_insensitive_loss
  • exp
  • floor
  • hard_sigmoid
  • hard_tanh
  • huber_loss
  • identity
  • interpolate
  • leaky_relu
  • log
  • log_sigmoid
  • log_softmax
  • max
  • max_pooling
  • maximum_scalar
  • maximum2
  • mean
  • min
  • minimum_scalar
  • minimum2
  • mul_scalar
  • mul2
  • pad
  • pow_scalar
  • pow2
  • prelu
  • r_div_scalar
  • r_pow_scalar
  • r_sub_scalar
  • relu
  • relu6
  • reshape
  • round
  • selu
  • sigmoid
  • sigmoid_cross_entropy
  • slice
  • softmax
  • softmax_cross_entropy
  • softplus
  • split
  • squared_error
  • stack
  • sub2
  • sum
  • sum_pooling
  • swish
  • tanh
  • transpose
  • unpooling

The double-backward of each function is now implemented in the python-layer using PythonFunction, we plan to move it to the C++/CUDA layer at a certain time.

Many thanks for reviewers @TE-andrewshin @TE-AkioHayakawa @TE-TakuyaNarihira @TE-TakuyaYashima @TE-NaokiIde @TE-StefanUhlich @TE-FabienCardinaux @TE-StephenTiedemann @TE-JavierAlonsoGarcia @TE-LukasMauch, especially @TE-TakuyaNarihira @TE-StefanUhlich @TE-LukasMauch.

@TE-KazukiYoshiyama TE-KazukiYoshiyama referenced this pull request Jul 19, 2019

@TE-TakuyaNarihira TE-TakuyaNarihira merged commit 3d36cbe into master Jul 22, 2019

@TE-YukioOobuchi TE-YukioOobuchi deleted the feature/20190206-double-backward-in-python branch Aug 29, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.