Hello!
I can’t get the compute_layer_style_cost function to work. I just get the exception “Wrong value” every time.
-I’ve redone, checked and rechecked the formula in the last line, but find no mistake. The function compute_content_cost uses the same functions for the calculation of the corresponding formula in the last line (but with different normalization constant of course) and it works fine.
-Below I will copy-paste values of a_S before and after reshaping. It has the shapes I expected and the reshaping seems to be right. But maybe I’ve missed something.
a_S before reshaping:
tf.Tensor(
[[[[-3.404881 7.183007 2.534576 ]
[-2.5186315 -3.8986888 -2.9244845 ]
[ 1.3512313 0.18695849 -1.2326248 ]
[-1.8821764 -1.5039697 -1.8601038 ]]
[[-0.39341784 -0.34587932 1.730303 ]
[ 5.434381 6.118635 0.91409665]
[-0.2787553 2.493302 2.0111642 ]
[ 3.5750656 9.585232 -2.3005989 ]]
[[-2.616547 6.5795145 5.8995004 ]
[ 1.2345984 -0.9685255 -2.2799122 ]
[ 0.25895953 -0.5711074 -1.6340902 ]
[-2.933355 2.555351 -3.1489797 ]]
[[-5.2402277 0.36834985 -0.42677724]
[ 0.19823879 7.452428 3.718691 ]
[ 1.3253293 6.3523054 5.739221 ]
[-0.41526246 0.583993 -2.0045857 ]]]], shape=(1, 4, 4, 3), dtype=float32)
a_S after reshaping:
tf.Tensor(
[[-3.404881 -2.5186315 1.3512313 -1.8821764 -0.39341784 5.434381
-0.2787553 3.5750656 -2.616547 1.2345984 0.25895953 -2.933355
-5.2402277 0.19823879 1.3253293 -0.41526246]
[ 7.183007 -3.8986888 0.18695849 -1.5039697 -0.34587932 6.118635
2.493302 9.585232 6.5795145 -0.9685255 -0.5711074 2.555351
0.36834985 7.452428 6.3523054 0.583993 ]
[ 2.534576 -2.9244845 -1.2326248 -1.8601038 1.730303 0.91409665
2.0111642 -2.3005989 5.8995004 -2.2799122 -1.6340902 -3.1489797
-0.42677724 3.718691 5.739221 -2.0045857 ]], shape=(3, 16), dtype=float32)
(3, 3)
Any hot tips?