pub trait TensorTraceHandler:
Send
+ Sync
+ 'static {
// Required method
fn trace_tensor_activity(
&self,
trace: &Trace,
event: Activity,
tensor_data: &Buffer,
tensor_shape: Shape,
);
}Expand description
Tensor event handler trait.
Required Methods§
Sourcefn trace_tensor_activity(
&self,
trace: &Trace,
event: Activity,
tensor_data: &Buffer,
tensor_shape: Shape,
)
fn trace_tensor_activity( &self, trace: &Trace, event: Activity, tensor_data: &Buffer, tensor_shape: Shape, )
This function is invoked each time the tensor event occures.
trace: Trace object that was reported.
Note that child traces of constructed one also are reported with this fn.
Check Trace::new_with_handle for more info.
event: activity that has occurred.
tensor_data: borrowed buffer containing data of the tensor.
tensor_shape: shape (name, data_type and dims) of the tensor.