New Art Generation with Neural Style Transfer!

Kudos to all responsible for the GPU implementation. I went back to ‘play’ and came up with this: Credit Picasso for the style image. 22250 epochs with learning rate 0.001 took about 10 minutes!!!

1 Like

Happy to know you are liking the GPU implementation

Looks great! @avsharp

So, now something is broken??

I didn’t change anything in the code but now failing in train-step. Grads is returning ‘None’.

I’ve tried restarting, clearing output and re-booting my machine. The error comes up on the first iteration?

ValueError: in user code:

<ipython-input-26-a37a602f80ad>:31 train_step  *
    optimizer.apply_gradients([(grad, generated_image)])
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/optimizer_v2/optimizer_v2.py:513 apply_gradients  **
    grads_and_vars = _filter_grads(grads_and_vars)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/optimizer_v2/optimizer_v2.py:1271 _filter_grads
    ([v.name for _, v in grads_and_vars],))

ValueError: No gradients provided for any variable: ['generated_image:0'].
1 Like

Hello paulinpaloalto, Thanks a lot for your help. I was indeed able to see through the problem.

I am deleting my question as it have almost all code for this question.

Sorry for my tone deaf question and obvious stack trace reading mistake. It was 3 AM post long work day. Once again thanks a lot for your comment.