@@ -918,8 +918,8 @@ def test_duplicated_duplicated_constant(self):
918
918
const_val = np .array ([1 , 2 , 3 ], dtype = np .float32 )
919
919
tensor_1 = helper .make_tensor ("tensor_1" , TensorProto .FLOAT , const_val .shape , const_val )
920
920
tensor_2 = helper .make_tensor ("tensor_2" , TensorProto .FLOAT , const_val .shape , const_val )
921
- tensor_3 = helper .make_tensor ("tensor_3" , TensorProto .FLOAT , const_val .shape , const_val . tobytes (), raw = True )
922
- tensor_4 = helper .make_tensor ("tensor_4" , TensorProto .FLOAT , const_val .shape , const_val . tobytes (), raw = True )
921
+ tensor_3 = helper .make_tensor ("tensor_3" , TensorProto .FLOAT , const_val .shape , const_val )
922
+ tensor_4 = helper .make_tensor ("tensor_4" , TensorProto .FLOAT , const_val .shape , const_val )
923
923
node0 = helper .make_node ('Constant' , inputs = [], outputs = ["value0" ], value = tensor_1 )
924
924
node1 = helper .make_node ('Constant' , inputs = [], outputs = ["value1" ], value = tensor_2 )
925
925
node2 = helper .make_node ('Constant' , inputs = [], outputs = ["value2" ], value = tensor_3 )
@@ -941,8 +941,8 @@ def test_duplicated_duplicated_constant(self):
941
941
942
942
def test_duplicated_duplicated_constant_and_initializer (self ):
943
943
const_val = np .array ([1 , 2 , 3 ], dtype = np .float32 )
944
- tensor_1 = helper .make_tensor ("value0" , TensorProto .FLOAT , const_val .shape , const_val )
945
- tensor_2 = helper .make_tensor ("value1" , TensorProto .FLOAT , const_val .shape , const_val )
944
+ tensor_1 = helper .make_tensor ("value0" , TensorProto .FLOAT , const_val .shape , const_val . tobytes (), raw = True )
945
+ tensor_2 = helper .make_tensor ("value1" , TensorProto .FLOAT , const_val .shape , const_val . tobytes (), raw = True )
946
946
tensor_3 = helper .make_tensor ("value2" , TensorProto .FLOAT , const_val .shape , const_val .tobytes (), raw = True )
947
947
tensor_4 = helper .make_tensor ("value3" , TensorProto .FLOAT , const_val .shape , const_val .tobytes (), raw = True )
948
948
node0 = helper .make_node ('Constant' , inputs = [], outputs = ["value0" ], value = tensor_1 )
0 commit comments