Comments (1)
Hello @veseln - thanks for raising this issue. I can confirm that this is indeed a bug.
You are entirely correct on the discrepancy between equation 5
and its implementation
https://github.com/ElementAI/HighRes-net/blob/aa022561c55ee3875b7d2e7837d37e620bf19315/src/train.py#L187
It seems to be a typo, and more than likely this is how the results were obtained.
A few notes:
-
I can confirm that the intention of Line 187 was to regularize the norm of the shifts (output by ShiftNet). As such, Line 187 is not strictly speaking the ShiftNet loss (or anything's loss for that matter). The ShiftNet parameters are learned by virtue of the quality of the reconstruction (the cPSNR-based loss). The regularizer was meant to keep the predicted shifts from deviating too much.
-
The bad news is that, as you rightly suggested, the mean of all shifts will tend to zero, and therefore its square will converge quadratically faster to zero. All this does is regularize the mean magnitude, so it's fair to say that Line 187 is totally moot.
-
The good bit of news is that, in retrospect, although we have not been regularizing the ShiftNet output all along, the end-to-end pipeline can work without this regulatization. The question remains however, on how the regularization affects overall performance. I would be grateful if you performed an ablation with the corrected line, and reported your results here.
In summary
ShiftNet is still learned to accommodate for the shifts between the SR and HR ground-truth. But the predicted shifts are effectively not regularized at all.
Hope this helps.
from highres-net.
Related Issues (10)
- RuntimeError: CUDA out of memory HOT 7
- Shared representation in fusion block
- Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [1, 4, 202, 202] HOT 6
- Calculation of val_score
- Lanczos code crashes HOT 3
- torch_mask 192 vs 384 HOT 3
- Pretrain-model HOT 1
- training problem because of the different sizes HOT 8
- predic HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from highres-net.