titu1994 / Neural-Style-Transfer

Keras Implementation of Neural Style Transfer from the paper "A Neural Algorithm of Artistic Style" (http://arxiv.org/abs/1508.06576) in Keras 2.0+
Apache License 2.0
2.27k stars 482 forks source link

convert_all_kernels_in_model removed from tf2 #76

Open olaviinha opened 3 years ago

olaviinha commented 3 years ago

It appears this deprecated function has been removed at some point after 2020-06-23, and this no longer works with Tensorflow 2.4.0

from tensorflow.keras.utils import convert_all_kernels_in_model
ImportError: cannot import name 'convert_all_kernels_in_model'
olaviinha commented 3 years ago

I see that in the Colab notebook provided, %tensorflow_version 1.x and INetwork.py are used, indicating tf 2 issues might not be relevant. However, this used to work with tf 2 in Colab just fine and dandy up until few months back at least. Tf 2 + inetwork_tf.py seems to have been able to handle larger images. Now that I fixed my own version of the notebook to run with tf 1 and INetwork.py, it works, but Colab seems to run out of memory pretty fast, even when using High-RAM env.

I.e. not entirely sure if valid issue, will leave to author to assess.