TensorContent
Content read back from a GlobalTensor.
Parameters
The Shared memory carrying the content read back from the tensor.
The global tensor being read back from.
Properties
Functions
Writes the content back to reset the tensor. This method uses the data currently held by this TensorContent to overwrite the tensor's content.
The suspend version of applyChange.
Gets a value from the tensor's content by index. The tensor must be of Tensor.DataType.FLOAT64, Tensor.DataType.FLOAT32, Tensor.DataType.INT32, Tensor.DataType.INT16 or Tensor.DataType.INT8 datatypes. Otherwise, you may consider to directly use buffer to read the content byte-by-byte.
Gets a range of values from the tensor's content. The tensor must be of Tensor.DataType.FLOAT64, Tensor.DataType.FLOAT32, Tensor.DataType.INT32, Tensor.DataType.INT16 or Tensor.DataType.INT8 datatypes. Otherwise, you may consider to directly use buffer to read the content byte-by-byte.
If the tensor from which the content is read back is of Tensor.DataType.FLOAT64 datatype, you can use this method to update the content to a double array. Then, you can call applyChange to apply the update to the tensor.
If the tensor from which the content is read back is of Tensor.DataType.FLOAT32 datatype, you can use this method to update the content to a float array. Then, you can call applyChange to apply the update to the tensor.
If the tensor from which the content is read back is of Tensor.DataType.INT32 datatype, you can use this method to update the content to an integer array. Then, you can call applyChange to apply the update to the tensor.
If the tensor from which the content is read back is of Tensor.DataType.INT16 datatype, you can use this method to update the content to a short array. Then, you can call applyChange to apply the update to the tensor.
Updates to the tensor's up-to-date's content. If you have changed the content, but have not called the applyChange or applyChangeSuspend to write the updated content back to the tensor, the change will be discarded.
Suspended version of update.