Skip to content

Commit

Permalink
fix ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
blackkker committed Jul 27, 2022
1 parent faef1a7 commit 1684eb2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/python/frontend/keras/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def pytest_generate_tests(metafunc):
# Scenarios:
# - classic keras, using keras from "import keras"
# - tensorflow keras, using keras from "from tensorflow import keras as tf_keras"
using_classic_keras = ("keras", {"keras": keras})
using_tensorflow_keras = ("tf_keras", {"keras": tf_keras})
using_classic_keras = ("keras", {"keras_": keras})
using_tensorflow_keras = ("tf_keras", {"keras_": tf_keras})


def verify_keras_frontend(keras_model, need_transpose=True, layout="NCHW"):
Expand Down Expand Up @@ -115,7 +115,7 @@ def to_channels_last(arr):


def get_mobilenet(keras_):
if hasattr(keras.applications, "MobileNet"):
if hasattr(keras_.applications, "MobileNet"):
# Keras 2.4.x and older
MobileNet = keras_.applications.MobileNet
else:
Expand Down Expand Up @@ -167,7 +167,7 @@ def test_forward_merge_dot(self, keras_):
]
for merge_func in merge_funcs:
out = merge_func([data1, data2])
keras_model = keras.models.Model([data1, data2], out)
keras_model = keras_.models.Model([data1, data2], out)
verify_keras_frontend(keras_model)

def test_forward_activations(self, keras_):
Expand Down Expand Up @@ -255,7 +255,7 @@ def test_forward_conv1d(self, keras_):
keras_.layers.Conv1D(filters=1, kernel_size=(3,), padding="valid", use_bias=False),
keras_.layers.Conv1D(filters=10, kernel_size=(2,), padding="valid"),
# Enable when relay conv1dtranspose handles NWC
# keras_.layers.Conv1DTranspose(filters=10, kernel_size=(3), padding="valid"),
# keras.layers.Conv1DTranspose(filters=10, kernel_size=(3), padding="valid"),
]
for conv_func in conv_funcs:
x = conv_func(data)
Expand Down

0 comments on commit 1684eb2

Please sign in to comment.