bug in div

This commit is contained in:
Roland Grinis 2021-07-10 16:47:10 +01:00
parent 6d5e4a5776
commit a0b72f519b

View File

@ -352,7 +352,7 @@ protected constructor(scope: NoaScope) :
JNoa.timesDoubleAssign(value, tensor.tensorHandle) JNoa.timesDoubleAssign(value, tensor.tensorHandle)
override fun Double.div(other: Tensor<Double>): NoaDoubleTensor = override fun Double.div(other: Tensor<Double>): NoaDoubleTensor =
other * (1 / this) other.tensor * (1 / this)
override fun Tensor<Double>.div(value: Double): NoaDoubleTensor = override fun Tensor<Double>.div(value: Double): NoaDoubleTensor =
tensor * (1 / value) tensor * (1 / value)
@ -428,7 +428,7 @@ protected constructor(scope: NoaScope) :
JNoa.timesFloatAssign(value, tensor.tensorHandle) JNoa.timesFloatAssign(value, tensor.tensorHandle)
override fun Float.div(other: Tensor<Float>): NoaFloatTensor = override fun Float.div(other: Tensor<Float>): NoaFloatTensor =
other * (1 / this) other.tensor * (1 / this)
override fun Tensor<Float>.div(value: Float): NoaFloatTensor = override fun Tensor<Float>.div(value: Float): NoaFloatTensor =
tensor * (1 / value) tensor * (1 / value)