Closed bkmgit closed 2 years ago
It would be nice to just make the code compatible with both TensorFlow 1 and 2.
Would you be interested in contributing a PR to do this?
I will give it a go. Tensor Flow is not guaranteed to keep the same APIs forever going forward, so perhaps having a deprecated final release version that is guaranteed to work with TensorFlow 1 is nice, and then having one for TensorFlow2 that could be evolved forward would also be nice.
On 7/25/19 8:24 PM, Anish Athalye wrote:
It would be nice to just make the code compatible with both TensorFlow 1 and 2.
Would you be interested in contributing a PR to do this?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/anishathalye/neural-style/issues/150?email_source=notifications&email_token=AAM2A5PG6OTZH4HMEYS2MJDQBHOT5A5CNFSM4IGYH3W2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22FKMA#issuecomment-515134768, or mute the thread https://github.com/notifications/unsubscribe-auth/AAM2A5LNNUVA7ARWHUN4UQLQBHOT5ANCNFSM4IGYH3WQ.
Sure. The current version works fine with TensorFlow 1, so that can serve as that version, and we can target modern TF from now onwards. I don't think it's necessary to maintain two versions in parallel.
Is there any progress to make the code compatible with the latest tensorflow? I am unable to use pip to install the requirements, I get:
ERROR: Could not find a version that satisfies the requirement tensorflow-gpu<2.0,>=1.0 (from -r requirements.txt (line 4)) (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.4.0rc0, 2.4.0rc1)
I'm not planning on doing the migration, though if someone sends a PR, I'd be happy to review it.
It might be that you're using too recent of a Python version for binary releases of tensorflow-gpu to be available. E.g. if you look at tensorflow-gpu 1.5.1, there are releases only for Python up to 3.6. The solution might be to use an older version of Python or build the dependency from source.
!git clone https://github.com/anishathalye/neural-style !wget https://www.vlfeat.org/matconvnet/models/imagenet-vgg-verydeep-19.mat pip install scipy==1.1.0 %tensorflow_version 1.x !python /content/neural-style/neural_style.py --help
Done in 70c1dc29dddbe5e2be6916fb44c055de38fc3f32. Only took 2 years 😛
May be good to indicate for TensorFlow 1, and may not be compatible with future versions, though it currently runs some of the used interfaces are deprecated in TensorFlow 2.