Table of Contents

Class CreateTensor

Namespace
Bonsai.ML.Torch
Assembly
Bonsai.ML.Torch.dll

Creates a tensor from the specified values. Uses Python-like syntax to specify the tensor values. For example, a 2x2 tensor can be created with the following values: "[[1, 2], [3, 4]]".

[Combinator]
[ResetCombinator]
[WorkflowElementCategory(ElementCategory.Source)]
public class CreateTensor : IScalarTypeProvider
Inheritance
CreateTensor
Implements
Inherited Members

Properties

Device

The device on which to create the tensor.

Type

The data type of the tensor elements.

Values

The values of the tensor elements. Uses Python-like syntax to specify the tensor values. For example: "[[1, 2], [3, 4]]".

Methods

Process()

Returns an observable sequence that creates a tensor from the specified values.

Process<T>(IObservable<T>)

Returns an observable sequence that creates a tensor from the specified values for each element in the input sequence.