tensorflow / benchmarks

A benchmark framework for Tensorflow
Apache License 2.0
1.15k stars 634 forks source link

Not compatible with Tensorflow 2.0.0 #430

Closed JMadgwick closed 4 years ago

JMadgwick commented 5 years ago

The repo looks like it was updated recently and there are mentions of TF 2.0.0. However, no benchmarks run all give the error.

from tensorflow.contrib.data.python.ops import threadpool
ModuleNotFoundError: No module named 'tensorflow.contrib'

Likely caused by renamed, moved or deleted module.

Edit: Also tried with latest tf_nightly-2.1.0.dev20191021-cp36-cp36m-manylinux2010_x86_64.whl still same issue.

DerekChia commented 5 years ago

What is your version of Tensorflow? I just tried with Tensorflow 1.14 and it works.

This is what I have:

tb-nightly             2.1.0a20191021     
tensorboard            1.14.0             
tensorflow-estimator   1.14.0             
tensorflow-gpu         1.14.0             
JMadgwick commented 5 years ago

As I said, I am using version 2.0.0.

tensorboard          2.0.0      
tensorflow           2.0.0      
tensorflow-estimator 2.0.1 

So far as I can see it will work with all versions older than 2.0.0, modules appear to be changed in version 2+.

Edit: I have tested Tensorflow 1.15 and that works but a huge number of:

WARNING:tensorflow:From ........ is deprecated and will be removed in a future version.

messages come up. Tensorflow 2 (2.0.0) is that new version and those calls are now deprecated and gone which explains the problem. Unless this repo receives a whole lot of updates I assume that these benchmarks will never be compatible with Tensorflow 2.

shun-lin commented 5 years ago

@JMadgwick tf.contrib is deprecated in tf 2.0.0 and some (not all) modules have migrated to tfa (tensorflow addons). It seems like you are running the script/tf-cnn-benchmark code and I think they last updated it 6 months ago before releasing. I am planning to use this package too (PerfZero), do you also run into problems for PerfZero part of this package?

reedwm commented 4 years ago

I recommend switching to the Official Models, which fully support TF 2. I just updated this tf_cnn_benchmarks to support TF 2, but I no longer plan on maintaining it.