@@ -137,12 +137,12 @@ public void Eval_LargeString_Scalar()
137137 public void Autocast_Case1 ( )
138138 {
139139 var sess = tf . Session ( ) . as_default ( ) ;
140- var input = tf . placeholder ( tf . float64 , shape : new TensorShape ( 6 ) ) ;
140+ var input = tf . placeholder ( tf . float32 , shape : new TensorShape ( 6 ) ) ;
141141 var op = tf . reshape ( input , new int [ ] { 2 , 3 } ) ;
142142 sess . run ( tf . global_variables_initializer ( ) ) ;
143143 var ret = sess . run ( op , feed_dict : ( input , np . array ( 1 , 2 , 3 , 4 , 5 , 6 ) ) ) ;
144144
145- ret . Should ( ) . BeOfType < double > ( ) . And . BeShaped ( 2 , 3 ) . And . BeOfValues ( 1 , 2 , 3 , 4 , 5 , 6 ) ;
145+ ret . Should ( ) . BeOfType < float > ( ) . And . BeShaped ( 2 , 3 ) . And . BeOfValues ( 1 , 2 , 3 , 4 , 5 , 6 ) ;
146146 print ( ret . dtype ) ;
147147 print ( ret ) ;
148148 }
@@ -165,12 +165,12 @@ public void Autocast_Case2()
165165 public void Autocast_Case3 ( )
166166 {
167167 var sess = tf . Session ( ) . as_default ( ) ;
168- var input = tf . placeholder ( tf . int16 , shape : new TensorShape ( 6 ) ) ;
168+ var input = tf . placeholder ( tf . int64 , shape : new TensorShape ( 6 ) ) ;
169169 var op = tf . reshape ( input , new int [ ] { 2 , 3 } ) ;
170170 sess . run ( tf . global_variables_initializer ( ) ) ;
171171 var ret = sess . run ( op , feed_dict : ( input , np . array ( 1 , 2 , 3 , 4 , 5 , 6 ) . astype ( NPTypeCode . Single ) + 0.1f ) ) ;
172172
173- ret . Should ( ) . BeOfType < short > ( ) . And . BeShaped ( 2 , 3 ) . And . BeOfValues ( 1 , 2 , 3 , 4 , 5 , 6 ) ;
173+ ret . Should ( ) . BeOfType < long > ( ) . And . BeShaped ( 2 , 3 ) . And . BeOfValues ( 1 , 2 , 3 , 4 , 5 , 6 ) ;
174174 print ( ret . dtype ) ;
175175 print ( ret ) ;
176176 }
0 commit comments