class Chainer::Functions::Math::Div

Public Instance Methods

backward(indexes, gy) click to toggle source
# File lib/chainer/functions/math/basic_math.rb, line 87
def backward(indexes, gy)
  gx0 = Utils::Array.force_array(gy[0] / x[1])
  [gx0, Utils::Array.force_array(-1 * gx0 * x[0] / x[1])]
end
forward(x) click to toggle source
# File lib/chainer/functions/math/basic_math.rb, line 83
def forward(x)
  [Utils::Array.force_array(x[0] / x[1])]
end