@@ -35,7 +35,8 @@ def _run_test_case(self, graph, feed_dict):
35
35
raised = False
36
36
try :
37
37
results = self .run_backend (graph , outputs , feed_dict )
38
- except : # pylint: disable=bare-except
38
+ except Exception as ex : # pylint: disable=broad-except
39
+ self .logger .error (ex )
39
40
raised = True
40
41
self .assertFalse (raised )
41
42
@@ -45,7 +46,8 @@ def _run_test_case(self, graph, feed_dict):
45
46
inferred_shape = tuple (graph .get_shape (inferred ))
46
47
try :
47
48
utils .merge_shapes (actual_shape , inferred_shape )
48
- except : # pylint: disable=bare-except
49
+ except Exception as ex : # pylint: disable=broad-except
50
+ self .logger .error (ex )
49
51
raised = True
50
52
self .assertFalse (raised )
51
53
@@ -271,7 +273,7 @@ def test_constant_of_shape(self):
271
273
self ._run_test_case (graph , self ._generate_random_inputs (inputs , shapes , dtypes ))
272
274
273
275
graph = self ._create_empty_graph ([], [], [])
274
- const = graph .make_const ("shape" , np .array ([3 , 5 , 6 ]))
276
+ const = graph .make_const ("shape" , np .array ([3 , 5 , 6 ], dtype = np . int64 ))
275
277
node = graph .make_node ("ConstantOfShape" , [const .output [0 ]])
276
278
graph .add_graph_output (node .output [0 ])
277
279
self ._run_test_case (graph , self ._generate_random_inputs ([], [], []))
0 commit comments