@@ -34,7 +34,7 @@ def test_static_layer_output_shape(self):
3434 sequence_length = 21
3535 feature_size = 30
3636 test_layer = position_embedding .PositionEmbedding (
37- max_length = sequence_length
37+ sequence_length = sequence_length
3838 )
3939 input_tensor = tf .keras .Input (shape = (sequence_length , feature_size ))
4040 output_tensor = test_layer (input_tensor )
@@ -51,7 +51,7 @@ def test_more_than_3_dimensions_static(self):
5151 sequence_length = 21
5252 feature_size = 30
5353 test_layer = position_embedding .PositionEmbedding (
54- max_length = sequence_length
54+ sequence_length = sequence_length
5555 )
5656 input_tensor = tf .keras .Input (
5757 shape = (feature_size , sequence_length , feature_size )
@@ -75,7 +75,7 @@ def test_float16_dtype(self):
7575 sequence_length = 21
7676 feature_size = 30
7777 test_layer = position_embedding .PositionEmbedding (
78- max_length = sequence_length , dtype = "float16"
78+ sequence_length = sequence_length , dtype = "float16"
7979 )
8080 input_tensor = tf .keras .Input (shape = (sequence_length , feature_size ))
8181 output_tensor = test_layer (input_tensor )
@@ -91,7 +91,7 @@ def test_dynamic_layer_output_shape(self):
9191 max_sequence_length = 40
9292 feature_size = 30
9393 test_layer = position_embedding .PositionEmbedding (
94- max_length = max_sequence_length
94+ sequence_length = max_sequence_length
9595 )
9696 # Create a 3-dimensional input (the first dimension is implicit).
9797 input_tensor = tf .keras .Input (shape = (None , feature_size ))
@@ -107,7 +107,7 @@ def test_more_than_3_dimensions_dynamic(self):
107107 max_sequence_length = 60
108108 feature_size = 30
109109 test_layer = position_embedding .PositionEmbedding (
110- max_length = max_sequence_length
110+ sequence_length = max_sequence_length
111111 )
112112 # Create a 4-dimensional input (the first dimension is implicit).
113113 input_tensor = tf .keras .Input (shape = (None , None , feature_size ))
@@ -123,7 +123,7 @@ def test_dynamic_layer_slicing(self):
123123 max_sequence_length = 40
124124 feature_size = 30
125125 test_layer = position_embedding .PositionEmbedding (
126- max_length = max_sequence_length
126+ sequence_length = max_sequence_length
127127 )
128128 # Create a 3-dimensional input (the first dimension is implicit).
129129 input_tensor = tf .keras .Input (shape = (None , feature_size ))
@@ -148,7 +148,7 @@ def test_callable_initializer(self):
148148 max_sequence_length = 4
149149 feature_size = 3
150150 test_layer = position_embedding .PositionEmbedding (
151- max_length = max_sequence_length ,
151+ sequence_length = max_sequence_length ,
152152 initializer = custom_init ,
153153 )
154154 inputs = tf .keras .Input (shape = (max_sequence_length , feature_size ))
@@ -172,7 +172,7 @@ def test_ragged_tensor_with_3_dimensions(self):
172172 max_sequence_length = 4
173173 feature_size = 2
174174 test_layer = position_embedding .PositionEmbedding (
175- max_length = max_sequence_length ,
175+ sequence_length = max_sequence_length ,
176176 initializer = custom_init ,
177177 )
178178 # Create a 3-dimensional ragged input (the first dimension is implicit).
@@ -209,7 +209,7 @@ def test_ragged_tensor_with_4_dimensions(self):
209209 max_sequence_length = 4
210210 feature_size = 2
211211 test_layer = position_embedding .PositionEmbedding (
212- max_length = max_sequence_length ,
212+ sequence_length = max_sequence_length ,
213213 initializer = custom_init ,
214214 )
215215 # Create a 4-dimensional ragged input (the first dimension is implicit).
@@ -254,7 +254,7 @@ def test_one_training_step(self):
254254 max_sequence_length = 4
255255 feature_size = 3
256256 test_layer = position_embedding .PositionEmbedding (
257- max_length = max_sequence_length
257+ sequence_length = max_sequence_length
258258 )
259259 inputs = tf .keras .Input (shape = (max_sequence_length , feature_size ))
260260 outputs = test_layer (inputs )
@@ -283,11 +283,11 @@ def test_one_training_step(self):
283283 def test_get_config_and_from_config (self ):
284284 max_sequence_length = 40
285285 test_layer = position_embedding .PositionEmbedding (
286- max_length = max_sequence_length
286+ sequence_length = max_sequence_length
287287 )
288288 config = test_layer .get_config ()
289289 expected_config_subset = {
290- "max_length " : max_sequence_length ,
290+ "sequence_length " : max_sequence_length ,
291291 "initializer" : {
292292 "class_name" : "GlorotUniform" ,
293293 "config" : {"seed" : None },
@@ -306,7 +306,7 @@ def test_save_model(self):
306306 max_sequence_length = 4
307307 feature_size = 6
308308 test_layer = position_embedding .PositionEmbedding (
309- max_length = max_sequence_length
309+ sequence_length = max_sequence_length
310310 )
311311 inputs = tf .keras .Input (shape = (max_sequence_length , feature_size ))
312312 outputs = test_layer (inputs )
0 commit comments