Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tf2 test fixups #5391

Merged
merged 2 commits into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/python/frontend/tensorflow/test_bn_dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
"""
import tvm
import numpy as np
import tensorflow as tf
try:
import tensorflow.compat.v1 as tf
except ImportError:
import tensorflow as tf
from tvm import relay
from tensorflow.python.framework import graph_util

Expand Down
8 changes: 4 additions & 4 deletions tests/python/frontend/tensorflow/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -1901,7 +1901,9 @@ def _get_tensorflow_output():

def test_forward_lstm():
'''test LSTM block cell'''
_test_lstm_cell(1, 2, 1, 0.5, 'float32')
if package_version.parse(tf.VERSION) < package_version.parse('2.0.0'):
#in 2.0, tf.contrib.rnn.LSTMBlockCell is removed
_test_lstm_cell(1, 2, 1, 0.5, 'float32')


#######################################################################
Expand Down Expand Up @@ -3308,9 +3310,7 @@ def test_forward_isfinite():
test_forward_ptb()

# RNN
if package_version.parse(tf.VERSION) < package_version.parse('2.0.0'):
#in 2.0, tf.contrib.rnn.LSTMBlockCell is removed
test_forward_lstm()
test_forward_lstm()

# Elementwise
test_forward_ceil()
Expand Down