jcjohnson / neural-style

Torch implementation of neural style algorithm
MIT License
18.31k stars 2.7k forks source link

question about Gram:updateGradInput(input,gradOutput) #479

Closed accrou closed 5 years ago

accrou commented 5 years ago

We know that

The function computes dE/dF like so dE/dF = dE/dG F + (dE/dG)t F

Why bother computing dE/dG when you can compute dE/dF directly from G, G of target, and F?