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

Not supported with tensorflow 2+ #107

Open
peterslany opened this issue Sep 30, 2020 · 8 comments
Open

Not supported with tensorflow 2+ #107

peterslany opened this issue Sep 30, 2020 · 8 comments

Comments

@peterslany
Copy link

It would be useful to put into readme that this repo works only with TensorFlow version below 2.0, because the contrib attribute is no longer supported in later versions.

@dalmo1991
Copy link

Probably it would be good practice specify versions for all requirements. Thanks

@ssg-git
Copy link

ssg-git commented Jan 9, 2021

Any advice on how to downgrade?
Getting stuck on going to 1.15

@nickyvdz-art
Copy link

It would be useful to put into readme that this repo works only with TensorFlow version below 2.0, because the contrib attribute is no longer supported in later versions.

Probably it would be good practice specify versions for all requirements. Thanks


maybe ive missed something - but:
Implementation Details

All images were rendered on a machine with:

CPU: Intel Core i7-6800K @ 3.40GHz × 12
GPU: NVIDIA GeForce GTX 1080/PCIe/SSE2
OS: Linux Ubuntu 16.04.1 LTS 64-bit
CUDA: 8.0
python: 2.7.12
tensorflow: 0.10.0rc
opencv: 2.4.9.1

@CherylHuang
Copy link

I did a little change on the code then run on tf 2.3.1 and it works fine.
First I simply change neural_style.py into neural_style_v2.py by using tf_upgrade_v2 (reference here)
Then delete all of the ".value" (e.g. h.value, w.value ...)
Finally use the adam opt instead of lbfgs
As @peterslany said the contrib attribute is no longer supported in tf 2+ versions, but I think maybe it could be replaced with the opt here? If you think the result of using the adam opt isn't good enough. (I haven't tried it)

the env I'm using:

python=3.7.9
tensorflow=2.3.1
opencv=4.5.2
CUDA=10.0
cuDNN=7.6.5

Hope this helps!

@scyheidekamp
Copy link

I did a little change on the code then run on tf 2.3.1 and it works fine.
First I simply change neural_style.py into neural_style_v2.py by using tf_upgrade_v2 (reference here)
Then delete all of the ".value" (e.g. h.value, w.value ...)
Finally use the adam opt instead of lbfgs
As @peterslany said the contrib attribute is no longer supported in tf 2+ versions, but I think maybe it could be replaced with the opt here? If you think the result of using the adam opt isn't good enough. (I haven't tried it)

the env I'm using:

python=3.7.9
tensorflow=2.3.1
opencv=4.5.2
CUDA=10.0
cuDNN=7.6.5

Hope this helps!

Hey, would you mind sharing your version somewhere? I'm trying to make this work, it would help me a lot!

@BDinspel
Copy link

BDinspel commented Oct 7, 2021

I did a little change on the code then run on tf 2.3.1 and it works fine.
First I simply change neural_style.py into neural_style_v2.py by using tf_upgrade_v2 (reference here)
Then delete all of the ".value" (e.g. h.value, w.value ...)
Finally use the adam opt instead of lbfgs
As @peterslany said the contrib attribute is no longer supported in tf 2+ versions, but I think maybe it could be replaced with the opt here? If you think the result of using the adam opt isn't good enough. (I haven't tried it)
the env I'm using:

python=3.7.9
tensorflow=2.3.1
opencv=4.5.2
CUDA=10.0
cuDNN=7.6.5

Hope this helps!

Hey, would you mind sharing your version somewhere? I'm trying to make this work, it would help me a lot!
neural_style.txt

I attached my version as .txt. It worked for me, maybe it'll help someone else, too

@sbetzin
Copy link

sbetzin commented Jun 28, 2022

@BDinspel Do you have forked this with the whole update? Do you mind sharing it?

@strohrbaugh
Copy link

@BDinspel Thanks so much for this! You saved me a lot of effort. Works great.

I attached my version as .txt. It worked for me, maybe it'll help someone else, too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants