Skip to content

Commit

Permalink
Rename dummy calss not to use test prefix (quic#3717)
Browse files Browse the repository at this point in the history
* Rename dummy class for testing without test prefix

---------

Signed-off-by: Hyeonwoo Koo <[email protected]>
  • Loading branch information
quic-hyeokoo authored Jan 9, 2025
1 parent 314cbb4 commit 8b73c0f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions TrainingExtensions/tensorflow/test/python/test_model_preparer.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ def call(self, inputs, **kwargs):


# Layer with multiple inputs
class TestMultiInput(tf.keras.layers.Layer):
class MultiInputLayer(tf.keras.layers.Layer):
def __init__(self, **kwargs) -> None:
super().__init__(name="test_multi_input")
super().__init__(name="multi_input_layer")

def call(self, inputs, **kwargs):
input1 = inputs[0]
Expand All @@ -244,9 +244,9 @@ def call(self, inputs, **kwargs):


# Layer with multiple outputs
class TestMultiOut(tf.keras.layers.Layer):
class MultiOutLayer(tf.keras.layers.Layer):
def __init__(self, **kwargs) -> None:
super().__init__(name="test_multi_out")
super().__init__(name="multi_out_layer")

def call(self, inputs, **kwargs):
out1 = inputs * 2.0
Expand Down Expand Up @@ -335,7 +335,7 @@ def get_model_with_multiple_inputs():
input2 = tf.keras.Input(shape=(28, 28, 1), name="input_2")
x = tf.keras.layers.Conv2D(16, 3, activation="relu")(input1)
y = tf.keras.layers.Conv2D(16, 3, activation="relu")(input2)
outputs = TestMultiInput()([x, y])
outputs = MultiInputLayer()([x, y])

return tf.keras.Model(inputs=[input1, input2], outputs=outputs, name="multi_input")

Expand All @@ -348,7 +348,7 @@ def get_model_with_multiple_outputs(use_lambdas):
x1a = x1 * 2.0
outputs = tf.concat([x0, x1a], 3)
else:
outputs = TestMultiOut()(x)
outputs = MultiOutLayer()(x)

return tf.keras.Model(inputs=inputs, outputs=outputs, name=f"multi_output_with_lambda_{use_lambdas}")

Expand Down

0 comments on commit 8b73c0f

Please sign in to comment.