Closed RaresBuzatu97 closed 3 years ago
@RaresBuzatu97 , this doesn't seem to be a bug or a feature request within scope of tensorflow_ hub.Please post this kind of issues in stackoverflow.
Also, please try with the below snippet and revert with the output/error :-
hub_handle = 'https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2'
hub_layer = hub.KerasLayer(hub_handle, trainable=True)
tf_input1 = tf.keras.layers.Input((None, None, 3), name = 'placeholder')
tf_input2 = tf.keras.layers.Input((256, 256, 3), name = 'placeholder_1')
tf_x = hub_layer(tf_input1,tf_input2)
Reproducible colab gist.
Hello! Thank you for your help. However, after modifying the last line I still get the same error:
Hi @RaresBuzatu97, please try:
layer = hub.KerasLayer(hub_handle, arguments={"placeholder_1": tf.constant(style_image)})
outputs = layer(content_image)
The approach above solved the issue for me. Please re-open the ticket if the problem persists.
Hello, This is my code:
When I run the code I get the following error:
Any idea why this is happening?