@@ -254,6 +254,22 @@ public override string ToString()
254254
255255 public static explicit operator ( int , int , int , int , int , int ) ( TensorShape shape ) => shape . dims . Length == 6 ? ( shape . dims [ 0 ] , shape . dims [ 1 ] , shape . dims [ 2 ] , shape . dims [ 3 ] , shape . dims [ 4 ] , shape . dims [ 5 ] ) : ( 0 , 0 , 0 , 0 , 0 , 0 ) ;
256256 public static implicit operator TensorShape ( ( int , int , int , int , int , int ) dims ) => new TensorShape ( dims . Item1 , dims . Item2 , dims . Item3 , dims . Item4 , dims . Item5 , dims . Item6 ) ;
257+
258+ public static explicit operator ( int , int , int , int , int , int , int ) ( TensorShape shape ) => shape . dims . Length == 7 ? ( shape . dims [ 0 ] , shape . dims [ 1 ] , shape . dims [ 2 ] , shape . dims [ 3 ] , shape . dims [ 4 ] , shape . dims [ 5 ] , shape . dims [ 6 ] ) : ( 0 , 0 , 0 , 0 , 0 , 0 , 0 ) ;
259+ public static implicit operator TensorShape ( ( int , int , int , int , int , int , int ) dims ) => new TensorShape ( dims . Item1 , dims . Item2 , dims . Item3 , dims . Item4 , dims . Item5 , dims . Item6 , dims . Item7 ) ;
260+
261+ public static explicit operator ( int , int , int , int , int , int , int , int ) ( TensorShape shape ) => shape . dims . Length == 8 ? ( shape . dims [ 0 ] , shape . dims [ 1 ] , shape . dims [ 2 ] , shape . dims [ 3 ] , shape . dims [ 4 ] , shape . dims [ 5 ] , shape . dims [ 6 ] , shape . dims [ 7 ] ) : ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) ;
262+ public static implicit operator TensorShape ( ( int , int , int , int , int , int , int , int ) dims ) => new TensorShape ( dims . Item1 , dims . Item2 , dims . Item3 , dims . Item4 , dims . Item5 , dims . Item6 , dims . Item7 , dims . Item8 ) ;
263+
264+ public static implicit operator TensorShape ( int ? [ ] dims ) => new TensorShape ( dims ) ;
265+ public static implicit operator TensorShape ( int ? dim ) => new TensorShape ( dim ) ;
266+ public static implicit operator TensorShape ( ( object , object ) dims ) => new TensorShape ( dims . Item1 , dims . Item2 ) ;
267+ public static implicit operator TensorShape ( ( object , object , object ) dims ) => new TensorShape ( dims . Item1 , dims . Item2 , dims . Item3 ) ;
268+ public static implicit operator TensorShape ( ( object , object , object , object ) dims ) => new TensorShape ( dims . Item1 , dims . Item2 , dims . Item3 , dims . Item4 ) ;
269+ public static implicit operator TensorShape ( ( object , object , object , object , object ) dims ) => new TensorShape ( dims . Item1 , dims . Item2 , dims . Item3 , dims . Item4 , dims . Item5 ) ;
270+ public static implicit operator TensorShape ( ( object , object , object , object , object , object ) dims ) => new TensorShape ( dims . Item1 , dims . Item2 , dims . Item3 , dims . Item4 , dims . Item5 , dims . Item6 ) ;
271+ public static implicit operator TensorShape ( ( object , object , object , object , object , object , object ) dims ) => new TensorShape ( dims . Item1 , dims . Item2 , dims . Item3 , dims . Item4 , dims . Item5 , dims . Item6 , dims . Item7 ) ;
272+ public static implicit operator TensorShape ( ( object , object , object , object , object , object , object , object ) dims ) => new TensorShape ( dims . Item1 , dims . Item2 , dims . Item3 , dims . Item4 , dims . Item5 , dims . Item6 , dims . Item7 , dims . Item8 ) ;
257273
258274 }
259275}
0 commit comments