I tried to download and run Manumorph - A Tensorflow implementation of Deep Painterly Harmonization.
I downloaded the most recent version of Tensorflow, which is apparently not compatible with the original python script. I am completely new to Tensorflow and don't know what any of the code does, so naturally, I'm having alot of trouble trying to fix the problems and need help.
I already found out that I have to change
from tensorflow.keras import backend as K
to
from tensorflow.compat.v1.keras import backend as K
The next error was the value error Input tensors to a Functional must come from tf.keras.Input raised by
model = VGG16(input_tensor=input_tensor, include_top=False, weights="imagenet")
which I fixed by changing
input_tensor = tf.concat([content_image, style_image, combination_im, mask_image], 0)
to
input_tensor = tf.keras.Input(tensor=tf.concat([content_image, style_image, combination_im, mask_image], 0))
But now I get the error Cannot assign to variable block1_conv1/kernel:0 due to variable shape (3, 3, 4, 64) and value shape (64, 3, 3, 3) are incompatible again raised by VGG16.
I'm totally lost. I thought I could just download everything and start experimenting. But now I already spent hours tracking down errors. I need help from someone with experience in Tensorflow.
https://stackoverflow.com/questions/67362729/cannot-get-manumorph-running-on-tensorflow-2 May 03, 2021 at 10:05AM
没有评论:
发表评论