use of org.tensorflow.internal.c_api.TFE_TensorHandle in project djl by deepjavalibrary.
the class TfNDArray method powi.
/**
* {@inheritDoc}
*/
@Override
public NDArray powi(NDArray other) {
TFE_TensorHandle newHandle = manager.opExecutor("Pow").addInput(this).addInput(other).buildRawPointer(1)[0];
setHandle(newHandle);
return this;
}
use of org.tensorflow.internal.c_api.TFE_TensorHandle in project djl by deepjavalibrary.
the class TfNDArray method signi.
/**
* {@inheritDoc}
*/
@Override
public NDArray signi() {
TFE_TensorHandle newHandle = manager.opExecutor("Sign").addInput(this).buildRawPointer(1)[0];
setHandle(newHandle);
return this;
}
use of org.tensorflow.internal.c_api.TFE_TensorHandle in project djl by deepjavalibrary.
the class TfNDArray method negi.
/**
* {@inheritDoc}
*/
@Override
public NDArray negi() {
TFE_TensorHandle newHandle = manager.opExecutor("Neg").addInput(this).buildRawPointer(1)[0];
setHandle(newHandle);
return this;
}
use of org.tensorflow.internal.c_api.TFE_TensorHandle in project djl by deepjavalibrary.
the class TfNDArray method addi.
/**
* {@inheritDoc}
*/
@Override
public NDArray addi(NDArray other) {
TFE_TensorHandle newHandle = manager.opExecutor("Add").addInput(this).addInput(other).buildRawPointer(1)[0];
setHandle(newHandle);
return this;
}
use of org.tensorflow.internal.c_api.TFE_TensorHandle in project djl by deepjavalibrary.
the class TfNDArrayEx method rpowi.
/**
* {@inheritDoc}
*/
@Override
public NDArray rpowi(Number n) {
TfNDManager manager = array.getManager();
try (NDArray temp = manager.create(n);
NDArray casted = temp.toType(array.getDataType(), false)) {
TFE_TensorHandle newHandle = manager.opExecutor("Pow").addInput(casted).addInput(array).buildRawPointer(1)[0];
array.setHandle(newHandle);
return array;
}
}
Aggregations