@@ -20,26 +20,26 @@ def test_layer_parameter_name(self):
20
20
self .model .input_feature_schema .float_features ,
21
21
output_dims
22
22
)
23
- self .assertEquals (self .model .layers [- 1 ].w , 'global_scope/fc/w' )
24
- self .assertEquals (fc1_output (), 'global_scope/fc/output' )
23
+ self .assertEqual (self .model .layers [- 1 ].w , 'global_scope/fc/w' )
24
+ self .assertEqual (fc1_output (), 'global_scope/fc/output' )
25
25
26
26
with scope .NameScope ('nested_scope' ):
27
27
fc2_output = self .model .FC (
28
28
fc1_output ,
29
29
output_dims
30
30
)
31
- self .assertEquals (self .model .layers [- 1 ].w ,
31
+ self .assertEqual (self .model .layers [- 1 ].w ,
32
32
'global_scope/nested_scope/fc/w' )
33
- self .assertEquals (fc2_output (),
33
+ self .assertEqual (fc2_output (),
34
34
'global_scope/nested_scope/fc/output' )
35
35
36
36
fc3_output = self .model .FC (
37
37
fc1_output ,
38
38
output_dims
39
39
)
40
- self .assertEquals (self .model .layers [- 1 ].w ,
40
+ self .assertEqual (self .model .layers [- 1 ].w ,
41
41
'global_scope/nested_scope/fc_auto_0/w' )
42
- self .assertEquals (fc3_output (),
42
+ self .assertEqual (fc3_output (),
43
43
'global_scope/nested_scope/fc_auto_0/output' )
44
44
45
45
def test_layer_shared_parameter_name_different_namescopes (self ):
@@ -51,19 +51,19 @@ def test_layer_shared_parameter_name_different_namescopes(self):
51
51
self .model .input_feature_schema .float_features ,
52
52
output_dims
53
53
)
54
- self .assertEquals (self .model .layers [- 1 ].w ,
54
+ self .assertEqual (self .model .layers [- 1 ].w ,
55
55
'global_scope/scope_0/fc/w' )
56
- self .assertEquals (fc1_output (),
56
+ self .assertEqual (fc1_output (),
57
57
'global_scope/scope_0/fc/output' )
58
58
59
59
with scope .NameScope ('scope_1' ):
60
60
fc2_output = self .model .FC (
61
61
self .model .input_feature_schema .float_features ,
62
62
output_dims
63
63
)
64
- self .assertEquals (self .model .layers [- 1 ].w ,
64
+ self .assertEqual (self .model .layers [- 1 ].w ,
65
65
'global_scope/scope_0/fc/w' )
66
- self .assertEquals (fc2_output (),
66
+ self .assertEqual (fc2_output (),
67
67
'global_scope/scope_1/fc/output' )
68
68
69
69
def test_layer_shared_parameter_name_within_same_namescope (self ):
@@ -74,14 +74,14 @@ def test_layer_shared_parameter_name_within_same_namescope(self):
74
74
self .model .input_feature_schema .float_features ,
75
75
output_dims
76
76
)
77
- self .assertEquals (self .model .layers [- 1 ].w ,
77
+ self .assertEqual (self .model .layers [- 1 ].w ,
78
78
'global_scope/fc/w' )
79
79
80
80
self .model .FC (
81
81
self .model .input_feature_schema .float_features ,
82
82
output_dims
83
83
)
84
- self .assertEquals (self .model .layers [- 1 ].w ,
84
+ self .assertEqual (self .model .layers [- 1 ].w ,
85
85
'global_scope/fc/w' )
86
86
87
87
def test_layer_shared_parameter_name_within_same_namescope_customized_name (self ):
@@ -93,15 +93,15 @@ def test_layer_shared_parameter_name_within_same_namescope_customized_name(self)
93
93
output_dims ,
94
94
name = 'shared_fc'
95
95
)
96
- self .assertEquals (self .model .layers [- 1 ].w ,
96
+ self .assertEqual (self .model .layers [- 1 ].w ,
97
97
'global_scope/shared_fc/w' )
98
98
99
99
self .model .FC (
100
100
self .model .input_feature_schema .float_features ,
101
101
output_dims ,
102
102
name = 'new_fc'
103
103
)
104
- self .assertEquals (self .model .layers [- 1 ].w ,
104
+ self .assertEqual (self .model .layers [- 1 ].w ,
105
105
'global_scope/shared_fc/w' )
106
106
107
107
def test_layer_shared_parameter_name_different_shapes (self ):
@@ -112,7 +112,7 @@ def test_layer_shared_parameter_name_different_shapes(self):
112
112
self .model .input_feature_schema .float_features ,
113
113
output_dims
114
114
)
115
- self .assertEquals (self .model .layers [- 1 ].w ,
115
+ self .assertEqual (self .model .layers [- 1 ].w ,
116
116
'global_scope/fc/w' )
117
117
118
118
with self .assertRaisesRegex (ValueError , 'Got inconsistent shapes .*' ):
@@ -145,7 +145,7 @@ def test_layer_duplicated_parameter_init(self):
145
145
op_outputs .extend (op .output )
146
146
147
147
# only fill these parameter blobs once
148
- self .assertEquals (
148
+ self .assertEqual (
149
149
sorted (op_outputs ),
150
150
['global_scope/shared_fc/b' , 'global_scope/shared_fc/w' ]
151
151
)
0 commit comments