Table of Contents

Class TensorConverter

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

Represents a type converter for tensors to and from string.

public class TensorConverter : TypeConverter
Inheritance
TensorConverter
Inherited Members

Methods

CanConvertFrom(ITypeDescriptorContext, Type)

Returns whether this converter can convert an object of the given type to the type of this converter, using the specified context.

CanConvertTo(ITypeDescriptorContext, Type)

Returns whether this converter can convert the object to the specified type, using the specified context.

ConvertFrom(ITypeDescriptorContext, CultureInfo, object)

Converts the given object to the type of this converter, using the specified context and culture information.

ConvertFromString(string, ScalarType)

Method that converts a string into a tensor. The string value should be in a Python-like syntax. For example, a 2x2 tensor can be created with the following values: "[[1, 2], [3, 4]]".

ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)

Converts the given value object to the specified type, using the specified context and culture information.

ConvertToString(Tensor, ScalarType)

Method that converts a tensor into a string. The string value is in a Python-like syntax. For example, a 2x2 tensor can be created with the following values: "[[1, 2], [3, 4]]".