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

[Fix] fix UnboundLocalError: local variable 'init_info' referenced be… #2123

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mmagic/models/editors/dcgan/dcgan_discriminator.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def init_weights(self):
return
for m in self.modules():
module_name = m.__class__.__name__
init_info = f'Initialize {module_name} by init_cfg {self.init_cfg}'
if isinstance(m, (nn.Conv2d, nn.ConvTranspose2d)):
normal_init(m, 0, 0.02)
init_info = (f'{module_name} belongs to (nn.Conv2d and '
Expand Down
6 changes: 3 additions & 3 deletions projects/magicmaker/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
</head>
<body>
<div class="space">
<iframe
class="iframe"
allowfullscreen="true"
<iframe
class="iframe"
allowfullscreen="true"
frameborder="0"
src="https://openxlab.org.cn/magic-maker/home">
</iframe>
Expand Down