Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improve] Refactor liif for pytorch2onnx #425

Merged
merged 6 commits into from
Jul 21, 2021
Merged

Conversation

Yshuo-Li
Copy link
Collaborator

Create generator

@Yshuo-Li Yshuo-Li added the status/WIP work in progress normally label Jul 11, 2021
@Yshuo-Li Yshuo-Li mentioned this pull request Jul 11, 2021
@codecov
Copy link

codecov bot commented Jul 11, 2021

Codecov Report

Merging #425 (20bd3df) into master (966eeb3) will increase coverage by 0.17%.
The diff coverage is 85.34%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #425      +/-   ##
==========================================
+ Coverage   80.66%   80.84%   +0.17%     
==========================================
  Files         188      189       +1     
  Lines       10106    10101       -5     
  Branches     1485     1485              
==========================================
+ Hits         8152     8166      +14     
+ Misses       1740     1721      -19     
  Partials      214      214              
Flag Coverage Δ
unittests 80.82% <85.34%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmedit/models/restorers/liif.py 58.10% <80.00%> (-6.98%) ⬇️
mmedit/models/backbones/sr_backbones/liif_net.py 85.32% <85.32%> (ø)
mmedit/models/backbones/__init__.py 100.00% <100.00%> (ø)
mmedit/models/backbones/sr_backbones/__init__.py 100.00% <100.00%> (ø)

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 966eeb3...20bd3df. Read the comment docs.

@Yshuo-Li Yshuo-Li removed the status/WIP work in progress normally label Jul 13, 2021

# model
self.encoder = build_backbone(encoder)
imnet_in_dim = self.encoder.mid_channels
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be a problem if self.encoder has no mid_channels.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.encoder can be EDSR or RDN, all of them have mid_channels.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we should add a value error? Now there is a chance that users use some other networks that contain no mid_channels.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep status quo and add helpful message when issues flood in.

mmedit/models/backbones/sr_backbones/liif_net.py Outdated Show resolved Hide resolved
mmedit/models/backbones/sr_backbones/liif_net.py Outdated Show resolved Hide resolved
feat.shape[2], feat.shape[3])

if self.local_ensemble:
vx_lst = [-1, 1]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to replace vx, rx, ... by some more meaningful names.

mmedit/models/backbones/sr_backbones/liif_net.py Outdated Show resolved Hide resolved
mmedit/models/backbones/sr_backbones/liif_net.py Outdated Show resolved Hide resolved
mmedit/models/backbones/sr_backbones/liif_net.py Outdated Show resolved Hide resolved
@innerlee innerlee merged commit 2e7f0c8 into open-mmlab:master Jul 21, 2021
@Yshuo-Li Yshuo-Li deleted the liif branch July 21, 2021 03:48
Yshuo-Li added a commit to Yshuo-Li/mmediting that referenced this pull request Jul 15, 2022
* Fix typo

* [Improve] Refactor liif for pytorch2onnx

* Add docstring

* Add checkpoints

* Update

* Update

Co-authored-by: liyinshuo <liyinshuo@sensetime.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants