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
Write the content back to reset the tensor. This method will use the data current held by this TensorContent to override the tensor's content.
The suspend version of applyChange.
Get 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.
Get 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 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.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 an short array. Then, you can call applyChange to apply the update to the tensor.
Update to the tensor's up-to-date's content. If you have changed the content, but have not call the applyChange or applyChangeSuspend to write the updated content back to the tensor, the change will be discarded.
Suspended version of update.