Course 4 Week 4 Assignment 2 train step error

Output for train step not matching.
Getting error: Unexpected cost for epoch 0: 551.5007934570312 != 10221.168

Please help.

I have the same issue but my error is Unexpected cost for epoch 0: 0.4120207130908966 != 10221.168.

My code:

{mentor edit: code removed - not allowed by the Honor Code}

Huh exact code and the answer differs. This is strange

how does your generated_image defined?
in my notebook it’s:
generated_image = tf.Variable(tf.image.convert_image_dtype(content_image, tf.float32))

Yep same definition. Maybe we have to use content_target and style_targets? (In [136])

Not sure how it can help

I have found that there was a mistake in one of my previous answers so now I get the right result. I propose that you check all the previous code and check that it equal to the expected result

I got the same issue but I have fixed it. The problem is at #UNQ_C3 where you need to put the tf.transpose at somewhere in the reshape function.

1 Like

I got the ‘‘AttributeError: ‘list’ object has no attribute ‘get_shape’’’, and I think the problem is at #UNQ_C3 too, any one could help me with that, please.

Please post a screen capture image showing the entire assert log.

I have the same issue here it is the error log:

Any suggestion ?

I’m also having the same issue for a couple of hours.

@andreyrmacedo please start a new thread and provide complete details. This thread is over a year cold.