class Chainer::Functions::Math::Neg

Public Instance Methods

backward(indexes, gy) click to toggle source
# File lib/chainer/functions/math/basic_math.rb, line 13
def backward(indexes, gy)
  [-gy[0]]
end
forward(x) click to toggle source
# File lib/chainer/functions/math/basic_math.rb, line 9
def forward(x)
  [Utils::Array.force_array(-x[0])]
end
label() click to toggle source
# File lib/chainer/functions/math/basic_math.rb, line 5
def label
  '__neg__'
end