-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
SSL example update #1365
SSL example update #1365
Conversation
def get_contrastive_model( | ||
feature_dim: int, arch: str = "resnet50", frozen: bool = False | ||
) -> ContrastiveModel: | ||
def conv_block(in_channels, out_channels, pool=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function
return nn.Sequential(*layers) | ||
|
||
|
||
def resnet9(in_size: int, in_channels: int, out_features: int, size: int = 16): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function
return nn.Sequential(*layers) | ||
|
||
|
||
def resnet9(in_size: int, in_channels: int, out_features: int, size: int = 16): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function
) | ||
|
||
|
||
def get_contrastive_model(in_size: int, feature_dim: int) -> ContrastiveModel: | ||
"""Init contrastive model based on parsed parametrs. | ||
|
||
Args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
DAR101 Missing parameter(s) in Docstring: - in_size
try: | ||
train_data = DATASETS[dataset]["dataset"](root="data", train=True, download=True) | ||
valid_data = DATASETS[dataset]["dataset"](root="data", train=False, download=True) | ||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
B901 blind except: statement
try: | ||
train_data = DATASETS[dataset]["dataset"](root="data", train=True, download=True) | ||
valid_data = DATASETS[dataset]["dataset"](root="data", train=False, download=True) | ||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
E722 do not use bare 'except'
try: | ||
train_data = DATASETS[dataset]["dataset"](root="data", train=True, download=True) | ||
valid_data = DATASETS[dataset]["dataset"](root="data", train=False, download=True) | ||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
B001 Do not use bare except:
, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:
. If you're sure what you're doing, be explicit and write except BaseException:
.
Hello @Scitator! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2021-11-30 05:38:07 UTC |
Pull Request FAQ
Description
Related Issue
Type of Change
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Checklist
latest
andminimal
requirements?