ckmarkoh / neuralart_tensorflow

Implementation of "A Neural Algorithm of Artistic Style" by Tensorflow
MIT License
496 stars 146 forks source link

not an issue, but a question #4

Open tcglarry opened 7 years ago

tcglarry commented 7 years ago

Hi Mark, I have read the paper, and watched your video, I think I got the very basic idea of the style transfer. However, there is one line I don't understand (maybe I am really not familiar with tensrorflow) In the following cost_content = sum(map(lambda l,: l[1]*build_content_loss(sess.run(net[l[0]]) , net[l[0]]) , CONTENT_LAYERS))

why using sess.run(net[l[0]]) vs. net[l[0] as cost computation ? what is the difference for net[0] in "sess.run' vs net[0] ?

ckmarkoh commented 7 years ago

because "net" is a dictionary, not a list. and l[0] is a key for this dictionary.