fzliu / style-transfer

An implementation of "A Neural Algorithm of Artistic Style" by L. Gatys, A. Ecker, and M. Bethge. http://arxiv.org/abs/1508.06576.
1.54k stars 387 forks source link

why net to flatten img0? #54

Open crystalbai opened 7 years ago

crystalbai commented 7 years ago

Hello, I tried to use a different network with different inputs, I find out that in the minimize function the author using img0.flatten(), why is that? Thanks, because I also need to input image size information into my network. I would really appreciate if someone could give me a hint!

deepbluesea commented 7 years ago

Return a copy of the array collapsed into one dimension. https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.flatten.html