print_tensor

Description

Saves the data of the specified tensor to ofile. If ofile is None, the tensor data is displayed on the screen directly.

Prototype

def print_tensor(tensor, ofile=None):

Parameters

Parameter

Type

Description

tensor

Tensor

Tensor to be printed.

ofile

File object or stream

(Optional)

File to which tensor data is written. If this parameter is not set, stdout (output to the screen) of the current system is used.

Returns

None

Restrictions

None

Example

For details, see Debugging Example.