TensorJsonConverter

Models & Types ยท AiDotNet.Serialization

JSON converter for Tensor types. Handles serialization and deserialization of tensor objects to/from JSON.

Inheritance: JsonConverter โ†’ TensorJsonConverter

For Beginners

This class knows how to convert a Tensor (a multi-dimensional array of numbers) into JSON text format and back. It saves the shape (dimensions) and all the data values, so the tensor can be perfectly reconstructed later.

Constructors

Constructor Summary
TensorJsonConverter()

Methods

Method Summary
bool CanConvert(Type objectType) Determines whether this converter can handle the specified type.
object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) Reads a Tensor object from JSON.
void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) Writes a Tensor object to JSON.