@@ -18,7 +18,7 @@ public static Tensor add(Tensor x, Tensor y)
1818
1919 var _op = _op_def_lib . _apply_op_helper ( "Add" , keywords : keywords ) ;
2020
21- return new Tensor ( _op , 0 , _op . OutputType ( 0 ) ) ;
21+ return _op . outputs [ 0 ] ;
2222 }
2323
2424 public static Tensor sub ( Tensor x , Tensor y )
@@ -29,7 +29,7 @@ public static Tensor sub(Tensor x, Tensor y)
2929
3030 var _op = _op_def_lib . _apply_op_helper ( "Sub" , name : "sub" , keywords : keywords ) ;
3131
32- return new Tensor ( _op , 0 , _op . OutputType ( 0 ) ) ;
32+ return _op . outputs [ 0 ] ;
3333 }
3434
3535 public static Tensor mul ( Tensor x , Tensor y )
@@ -40,7 +40,7 @@ public static Tensor mul(Tensor x, Tensor y)
4040
4141 var _op = _op_def_lib . _apply_op_helper ( "Mul" , keywords : keywords ) ;
4242
43- return new Tensor ( _op , 0 , _op . OutputType ( 0 ) ) ;
43+ return _op . outputs [ 0 ] ;
4444 }
4545
4646 public static Tensor real_div ( Tensor x , Tensor y )
@@ -51,7 +51,7 @@ public static Tensor real_div(Tensor x, Tensor y)
5151
5252 var _op = _op_def_lib . _apply_op_helper ( "RealDiv" , name : "truediv" , keywords : keywords ) ;
5353
54- return new Tensor ( _op , 0 , _op . OutputType ( 0 ) ) ;
54+ return _op . outputs [ 0 ] ;
5555 }
5656
5757 public static Tensor mat_mul ( Tensor a , Tensor b , bool transpose_a = false , bool transpose_b = false )
@@ -64,7 +64,7 @@ public static Tensor mat_mul(Tensor a, Tensor b, bool transpose_a = false, bool
6464
6565 var _op = _op_def_lib . _apply_op_helper ( "MatMul" , keywords : keywords ) ;
6666
67- return new Tensor ( _op , 0 , _op . OutputType ( 0 ) ) ;
67+ return _op . outputs [ 0 ] ;
6868 }
6969
7070 public static Tensor pow ( Tensor x , double y )
@@ -75,7 +75,7 @@ public static Tensor pow(Tensor x, double y)
7575
7676 var _op = _op_def_lib . _apply_op_helper ( "Pow" , keywords : keywords ) ;
7777
78- return new Tensor ( _op , 0 , _op . OutputType ( 0 ) ) ;
78+ return _op . outputs [ 0 ] ;
7979 }
8080
8181 public static Tensor sum ( Tensor input , Tensor axis = null )
@@ -87,7 +87,7 @@ public static Tensor sum(Tensor input, Tensor axis = null)
8787
8888 var _op = _op_def_lib . _apply_op_helper ( "Sum" , keywords : keywords ) ;
8989
90- return new Tensor ( _op , 0 , _op . OutputType ( 0 ) ) ;
90+ return _op . outputs [ 0 ] ;
9191 }
9292
9393 /// <summary>
0 commit comments