TensorPlay
API symbolstypename
Copy
View MarkdownDownload .md

tensorplay.typename

tensorplay.typename(obj: Any, /) str[source]

String representation of the type of an object.

This function returns a fully qualified string representation of an object’s type. :param obj: The object whose type to represent :type obj: object

Returns:

the type of the object o

Return type:

str

Example

>>> x = tensorplay.tensor([1, 2, 3])
>>> tensorplay.typename(x)
'tensorplay.LongTensor'
>>> tensorplay.typename(tensorplay.nn.Parameter)
'tensorplay.nn.parameter.Parameter'
Ask DeepWiki