ShapeMismatchException class

Thrown when tensor shapes do not match expected dimensions.

Inheritance

Constructors

ShapeMismatchException({List<int>? expected, required List<int> actual, String? message})
Creates a shape mismatch exception.
ShapeMismatchException.rank(int expectedRank, int actualRank)
Creates an exception for rank mismatch.
factory

Properties

actual List<int>
The actual shape that was provided.
final
expected List<int>?
The expected shape, if known.
final
hashCode int
The hash code for this object.
no setterinherited
message String
The error message.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited