TensorShapeMismatchException

Exceptions · AiDotNet.Exceptions

Exception thrown when a tensor’s shape doesn’t match the expected shape.

Inheritance: Exception → AiDotNetException → TensorShapeMismatchException

Constructors

Constructor Summary
TensorShapeMismatchException() Initializes a new instance of the TensorShapeMismatchException class.
TensorShapeMismatchException(int[] expectedShape, int[] actualShape, string component, string operation) Initializes a new instance of the TensorShapeMismatchException class.
TensorShapeMismatchException(int[] expectedShape, int[] actualShape, string component, string operation, Exception innerException) Initializes a new instance of the TensorShapeMismatchException class with shape information and a reference to the inner exception that is the cause of this exception.
TensorShapeMismatchException(int[] expectedShape, int[] actualShape, string context) Initializes a new instance of the TensorShapeMismatchException class with a simplified context.
TensorShapeMismatchException(string message) Initializes a new instance of the TensorShapeMismatchException class with a specified error message.
TensorShapeMismatchException(string message, Exception innerException) Initializes a new instance of the TensorShapeMismatchException class with a specified error message and a reference to the inner exception that is the cause of this exception.

Properties

Property Summary
int[] ActualShape { get; } The actual shape of the tensor.
int[] ExpectedShape { get; } The expected shape of the tensor.
string Component { get; } The component where the shape mismatch occurred.
string Operation { get; } The operation being performed when the mismatch was detected.