pystiche / papers

Reference implementation and replication of prominent NST papers
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Manipulate gradients in ulyanov_et_al_2016 #250

Closed jbueltemeier closed 3 years ago

jbueltemeier commented 3 years ago

Since in their implementation the forward pass and the backward pass are independent of each other, the backward pass must be manipulated in pytorch to reproduce the results. This includes the removal of gradients automatically created by pytorch, the addition of gradient normalization at certain points, and the addition of gradient normalization.

codecov[bot] commented 3 years ago

Codecov Report

Merging #250 (da2503b) into master (7ba28c6) will decrease coverage by 0.2%. The diff coverage is 77.7%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #250     +/-   ##
========================================
- Coverage    98.6%   98.4%   -0.3%     
========================================
  Files          39      39             
  Lines        1558    1601     +43     
========================================
+ Hits         1537    1576     +39     
- Misses         21      25      +4     
Impacted Files Coverage Δ
pystiche_papers/ulyanov_et_al_2016/_loss.py 94.2% <76.4%> (-5.8%) :arrow_down:
pystiche_papers/ulyanov_et_al_2016/_utils.py 100.0% <100.0%> (ø)
pystiche_papers/li_wand_2016/_utils.py 96.1% <0.0%> (ø)
pystiche_papers/gatys_et_al_2017/_utils.py 100.0% <0.0%> (ø)
pystiche_papers/ulyanov_et_al_2016/_data.py 100.0% <0.0%> (ø)
pystiche_papers/ulyanov_et_al_2016/_modules.py 100.0% <0.0%> (ø)
pystiche_papers/gatys_ecker_bethge_2016/_utils.py 100.0% <0.0%> (ø)
pystiche_papers/ulyanov_et_al_2016/_nst.py 95.5% <0.0%> (+0.2%) :arrow_up:
pystiche_papers/utils/modules.py 98.5% <0.0%> (+0.3%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7ba28c6...da2503b. Read the comment docs.