Please use. NET 5,. NET 6, NET 7,. NET 8, NET Framework 4.6, NET Framework 4.61, NET Framework 4.7, NET Framework 4.72, NET Framework 4.8, NET Framework 4.81, and. NET Core 3.1 versions

DataTensor 类

Manages collection of tensor nodes with validation and enumeration capabilities 管理具有验证和枚举功能的张量节点集合

Definition

命名空间: DeploySharp.Data
程序集: DeploySharp (在 DeploySharp.dll 中) 版本:0.0.4+6e8a2e904469617cd59619d666c0e272985c0e33
C#
public sealed class DataTensor : IEnumerable<NodeData>, 
	IEnumerable, IDisposable
Inheritance
Object    DataTensor
Implements
IEnumerableNodeData, IEnumerable, IDisposable

备注

Provides indexed access to nodes by both numeric index and name. 提供通过数值索引和名称对节点的索引访问。

Implements IDisposable for proper cleanup of managed nodes. 实现了IDisposable接口以正确清理托管节点。

构造函数

DataTensor初始化 DataTensor 类的一个新实例

属性

Count Gets the number of nodes in the collection 获取集合中的节点数量
ItemInt32 Indexer to access nodes by numerical index 通过数值索引访问节点的索引器
ItemString Indexer to access nodes by name 通过名称访问节点的索引器
TotalElements Gets the total number of elements across all node buffers 获取所有节点缓冲区中的元素总数

方法

AddNode(String, Int32, TensorType, Array, Int32, Type) Adds a new node to the collection using external memory 使用外部内存向集合中添加新节点
AddNodeT(String, Int32, TensorType, Int32) Adds a new node to the collection with newly allocated memory 使用新分配的内存向集合中添加新节点
Dispose Releases all resources used by the DataTensor 释放DataTensor使用的所有资源
EqualsDetermines whether the specified object is equal to the current object.
(继承自 Object。)
GetEnumerator Returns an enumerator that iterates through the collection of nodes 返回一个遍历节点集合的枚举器
GetHashCodeServes as the default hash function.
(继承自 Object。)
GetNode Gets a node by name 通过名称获取节点
GetTypeGets the Type of the current instance.
(继承自 Object。)
ToStringReturns a string that represents the current object.
(继承自 Object。)
TryGetNode Attempts to get a node by name 尝试通过名称获取节点

字段

参见