Click or drag to resize

Tensor Class

https://www.emgu.com/wiki/index.php/Emgu_TF
Tensor holds a multi-dimensional array of elements of a single data type. For all types other than STRING, the data buffer stores elements in row major order. E.g. if data is treated as a vector of TF_DataType: element 0: index (0, ..., 0) element 1: index (0, ..., 1) ... The format for TF_STRING tensors is: start_offset: array[uint64] data: byte[...] The string length (as a varint), followed by the contents of the string is encoded at data[start_offset[i]]]. StringEncode and StringDecode facilitate this encoding.
Inheritance Hierarchy

Namespace:  Emgu.TF
Assembly:  Emgu.TF.Netstandard (in Emgu.TF.Netstandard.dll) Version: 2.6.0.1294
Syntax
public class Tensor : UnmanagedObject

The Tensor type exposes the following members.

Constructors
  NameDescription
Public methodTensor(Double)
Create a Tensor that consist of a single float value
Public methodTensor(Double)
Create a Tensor that consist of an array of double value
Public methodTensor(Int16)
Create a Tensor that consist of a single int16 value
Public methodTensor(Int32)
Create a Tensor that consist of a single int value
Public methodTensor(Int32)
Create a Tensor that consist of an array of int value
Public methodTensor(Int64)
Create a Tensor that consist of a single int64 value
Public methodTensor(Single)
Create a Tensor that consist of a single float value
Public methodTensor(Single)
Create a Tensor that consist of an array of float value
Public methodTensor(UInt16)
Create a Tensor that consist of an array of UInt16 value
Public methodTensor(UInt32)
Create a Tensor that consist of an array of UInt32 value
Public methodTensor(UInt64)
Create a Tensor that consist of an array of UInt64 value
Public methodTensor(DataType, Int32)
Allocate a new tensor. The caller must set the Tensor values by writing them to the DataPointer with length ByteSize.
Top
Properties
  NameDescription
Public propertyByteSize
Return the size of the underlying data in bytes.
Public propertyData
Get the tensor data as a managed array
Public propertyDataPointer
Get the native pointer to the tensor data
Public propertyDim
Return the dimension of the tensor
Public propertyDisposed
Returns true if the object has been disposed.
(Inherited from DisposableObject.)
Public propertyJaggedData
Get the tensor data as a jagged array
Public propertyPtr
Pointer to the unmanaged object
(Inherited from UnmanagedObject.)
Public propertyType
Get the type of data from this tensor
Top
Methods
  NameDescription
Public methodDecodeString
Decode a string encoded
Public methodDispose
The dispose function that implements IDisposable interface
(Inherited from DisposableObject.)
Protected methodDisposeObject
Release the unmanaged memory associated with this tensor
(Overrides DisposableObjectDisposeObject.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Destructor
(Inherited from DisposableObject.)
Public methodFlatT
Get the tensor data as a flatten single dimension array
Public methodStatic memberFromString
Convert a byte array to a Tensor
Public methodGetData
Get a copy of the tensor data as a managed array
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodReleaseManagedResources
Release the managed resources. This function will be called during the disposal of the current object. override ride this function if you need to call the Dispose() function on any managed IDisposable object created by the current object
(Inherited from DisposableObject.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Protected field_ptr
A pointer to the unmanaged object
(Inherited from UnmanagedObject.)
Top
See Also