@@ -47,7 +47,7 @@ def test_single_dynamic_gru(self):
47
47
input_names_with_port = ["input_1:0" ]
48
48
feed_dict = {"input_1:0" : x_val }
49
49
output_names_with_port = ["output:0" , "cell_state:0" ]
50
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-03 )
50
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-03 , atol = 1e-06 )
51
51
52
52
def test_multiple_dynamic_gru (self ):
53
53
units = 5
@@ -93,7 +93,7 @@ def test_multiple_dynamic_gru(self):
93
93
feed_dict = {"input_1:0" : x_val }
94
94
input_names_with_port = ["input_1:0" ]
95
95
output_names_with_port = ["output:0" , "cell_state:0" ]
96
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 )
96
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 , atol = 1e-06 )
97
97
98
98
def test_single_dynamic_gru_seq_length_is_const (self ):
99
99
units = 5
@@ -119,7 +119,7 @@ def test_single_dynamic_gru_seq_length_is_const(self):
119
119
feed_dict = {"input_1:0" : x_val }
120
120
input_names_with_port = ["input_1:0" ]
121
121
output_names_with_port = ["output:0" , "cell_state:0" ]
122
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 )
122
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 , atol = 1e-06 )
123
123
124
124
def test_single_dynamic_gru_seq_length_is_not_const (self ):
125
125
units = 5
@@ -148,7 +148,7 @@ def test_single_dynamic_gru_seq_length_is_not_const(self):
148
148
feed_dict = {"input_1:0" : x_val , "input_2:0" : y_val }
149
149
input_names_with_port = ["input_1:0" , "input_2:0" ]
150
150
output_names_with_port = ["output:0" , "cell_state:0" ]
151
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-03 )
151
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-03 , atol = 1e-06 )
152
152
153
153
def test_single_dynamic_gru_placeholder_input (self ):
154
154
units = 5
@@ -172,7 +172,7 @@ def test_single_dynamic_gru_placeholder_input(self):
172
172
feed_dict = {"input_1:0" : x_val }
173
173
input_names_with_port = ["input_1:0" ]
174
174
output_names_with_port = ["output:0" , "cell_state:0" ]
175
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-03 )
175
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-03 , atol = 1e-06 )
176
176
177
177
def test_single_dynamic_gru_ch_zero_state_initializer (self ):
178
178
units = 5
@@ -201,7 +201,7 @@ def test_single_dynamic_gru_ch_zero_state_initializer(self):
201
201
feed_dict = {"input_1:0" : x_val }
202
202
input_names_with_port = ["input_1:0" ]
203
203
output_names_with_port = ["output:0" , "cell_state:0" ]
204
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-03 )
204
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-03 , atol = 1e-06 )
205
205
206
206
@unittest .skip ("FIXME: disable for now for accuracy problem" )
207
207
def test_single_dynamic_gru_random_weights (self ):
@@ -304,7 +304,7 @@ def test_dynamic_gru_state_consumed_only(self):
304
304
feed_dict = {"input_1:0" : x_val }
305
305
input_names_with_port = ["input_1:0" ]
306
306
output_names_with_port = ["cell_state:0" ]
307
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 0.0001 , atol = 1e-07 )
307
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 0.0001 , atol = 1e-06 )
308
308
309
309
def test_dynamic_bigru (self ):
310
310
units = 5
@@ -335,7 +335,7 @@ def test_dynamic_bigru(self):
335
335
feed_dict = {"input_1:0" : x_val }
336
336
input_names_with_port = ["input_1:0" ]
337
337
output_names_with_port = ["output:0" , "cell_state:0" ]
338
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 )
338
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 , atol = 1e-06 )
339
339
340
340
def test_dynamic_bigru_output_consumed_only (self ):
341
341
units = 5
@@ -365,7 +365,7 @@ def test_dynamic_bigru_output_consumed_only(self):
365
365
feed_dict = {"input_1:0" : x_val }
366
366
input_names_with_port = ["input_1:0" ]
367
367
output_names_with_port = ["output:0" ]
368
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 )
368
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 , atol = 1e-06 )
369
369
370
370
def test_dynamic_bigru_state_consumed_only (self ):
371
371
units = 5
@@ -395,7 +395,7 @@ def test_dynamic_bigru_state_consumed_only(self):
395
395
feed_dict = {"input_1:0" : x_val }
396
396
input_names_with_port = ["input_1:0" ]
397
397
output_names_with_port = ["cell_state:0" ]
398
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 )
398
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 , atol = 1e-06 )
399
399
400
400
def test_dynamic_bidirectional_but_one_gru (self ):
401
401
units = 5
@@ -423,7 +423,7 @@ def test_dynamic_bidirectional_but_one_gru(self):
423
423
feed_dict = {"input_1:0" : x_val }
424
424
input_names_with_port = ["input_1:0" ]
425
425
output_names_with_port = ["output:0" , "cell_state:0" ]
426
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 )
426
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 , atol = 1e-06 )
427
427
428
428
def test_dynamic_bidirectional_but_one_gru_and_output_consumed_only (self ):
429
429
units = 5
@@ -448,7 +448,7 @@ def test_dynamic_bidirectional_but_one_gru_and_output_consumed_only(self):
448
448
feed_dict = {"input_1:0" : x_val }
449
449
input_names_with_port = ["input_1:0" ]
450
450
output_names_with_port = ["output:0" ]
451
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 )
451
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 , atol = 1e-06 )
452
452
453
453
def test_dynamic_bidirectional_but_one_gru_and_state_consumed_only (self ):
454
454
units = 5
@@ -473,7 +473,7 @@ def test_dynamic_bidirectional_but_one_gru_and_state_consumed_only(self):
473
473
feed_dict = {"input_1:0" : x_val }
474
474
input_names_with_port = ["input_1:0" ]
475
475
output_names_with_port = ["cell_state:0" ]
476
- self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 )
476
+ self .run_test_case (feed_dict , input_names_with_port , output_names_with_port , rtol = 1e-3 , atol = 1e-06 )
477
477
478
478
479
479
if __name__ == '__main__' :
0 commit comments