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

Error while executing firenet.py- TensorFlow 2.0 #47

Open
grtdeveloper opened this issue May 7, 2020 · 1 comment
Open

Error while executing firenet.py- TensorFlow 2.0 #47

grtdeveloper opened this issue May 7, 2020 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@grtdeveloper
Copy link

while issuing command python3 firenet.py models/test.mp4 got the following error.
All necessary packages are installed.

import tflearn
File "/usr/local/lib/python3.6/dist-packages/tflearn/init.py", line 4, in
from . import config
File "/usr/local/lib/python3.6/dist-packages/tflearn/config.py", line 5, in
from .variables import variable
File "/usr/local/lib/python3.6/dist-packages/tflearn/variables.py", line 7, in
from tensorflow.contrib.framework.python.ops import add_arg_scope as contrib_add_arg_scope
File "/usr/local/lib/python3.6/dist-packages/tensorflow/contrib/init.py", line 27, in
from tensorflow.contrib import cudnn_rnn
File "/usr/local/lib/python3.6/dist-packages/tensorflow/contrib/cudnn_rnn/init.py", line 28, in
from tensorflow.contrib.cudnn_rnn.python.ops.cudnn_rnn_ops import CudnnGRU
File "/usr/local/lib/python3.6/dist-packages/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py", line 21, in
from tensorflow.contrib.cudnn_rnn.ops import gen_cudnn_rnn_ops
File "/usr/local/lib/python3.6/dist-packages/tensorflow/contrib/cudnn_rnn/ops/gen_cudnn_rnn_ops.py", line 940, in
_op_def_lib = _InitOpDefLibrary()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/contrib/cudnn_rnn/ops/gen_cudnn_rnn_ops.py", line 365, in _InitOpDefLibrary
_op_def_registry.register_op_list(op_list)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_registry.py", line 35, in register_op_list
assert _registered_ops[op_def.name] == op_def
AssertionError

Computing Environment (please complete the following information):

  • Linux Ubuntu 17.10
  • Tensorflow Version: 2.0
  • OpenCV Version: 3.3.1
@tobybreckon
Copy link
Owner

tobybreckon commented May 7, 2020

In essence we do not (and cannot easily) support TensorFlow 2.0 because TFlearn, which this project is based upon, is not available with TensorFlow > 1.15 (google: "tensorflow 2.0 tflearn" for the background).

As you an see - your failure is at the import tflearn line even before you get to the code specific to this project.

[ Why did we use TFlearn ? - because it was 2017 and Pytorch et al., was not mature enough yet and this was the goto "easy to use" package for this type of work ]

A workflow to make this repo work on your system is via a Tensorflow 1 virtual environment. Install the required packages for virtualenv on Linux Ubuntu 18.10 and then ...

virtualenv --system-site-packages -p python3 ./venv/tf-1.1.5-gpu
source ~/venv/tf-1.1.5-gpu/bin/activate
pip install tensorflow-gpu==1.15
pip install tflearn
....
python3 firenet.py models/test.mp4

I am more than happy to be corrected if someone can post a pull request for a set of TF 2.0 fixes (but as far as I can tell the complexity of such a fix is way beyond the TF 1.x -> TF 2.x translation scripts etc).

@tobybreckon tobybreckon changed the title Error while executing firenet.py Error while executing firenet.py- TensorFlow 2.0 May 7, 2020
@tobybreckon tobybreckon reopened this May 7, 2020
@tobybreckon tobybreckon added bug Something isn't working help wanted Extra attention is needed labels May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants