File tree 1 file changed +3
-4
lines changed
src/Microsoft.ML.OnnxTransformer
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -805,7 +805,7 @@ private class NamedOnnxValueGetterVec<T> : INamedOnnxValueGetter
805
805
public NamedOnnxValueGetterVec ( DataViewRow input , int colIndex , OnnxShape tensorShape )
806
806
{
807
807
_srcGetter = input . GetGetter < VBuffer < T > > ( input . Schema [ colIndex ] ) ;
808
- _tensorShape = tensorShape ;
808
+ _tensorShape = new OnnxShape ( tensorShape ) ;
809
809
_colName = input . Schema [ colIndex ] . Name ;
810
810
_vBuffer = default ;
811
811
_vBufferDense = default ;
@@ -840,9 +840,8 @@ private NamedOnnxValue GetNamedOnnxValueUnknownSize()
840
840
{
841
841
GetNamedOnnxValueCore ( ) ;
842
842
843
- var tensorShape = new OnnxShape ( _tensorShape ) ;
844
- tensorShape [ _zeroIndex ] = _vBufferDense . Length / _denominator ;
845
- return OnnxUtils . CreateNamedOnnxValue ( _colName , _vBufferDense . GetValues ( ) , tensorShape ) ;
843
+ _tensorShape [ _zeroIndex ] = _vBufferDense . Length / _denominator ;
844
+ return OnnxUtils . CreateNamedOnnxValue ( _colName , _vBufferDense . GetValues ( ) , _tensorShape ) ;
846
845
}
847
846
}
848
847
}
You can’t perform that action at this time.
0 commit comments