Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
6a4fa73a
Commit
6a4fa73a
authored
Oct 22, 2022
by
discus0434
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fix
parent
97749b7c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
hypernetwork.py
modules/hypernetworks/hypernetwork.py
+3
-4
No files found.
modules/hypernetworks/hypernetwork.py
View file @
6a4fa73a
...
...
@@ -51,10 +51,9 @@ class HypernetworkModule(torch.nn.Module):
if
add_layer_norm
:
linears
.
append
(
torch
.
nn
.
LayerNorm
(
int
(
dim
*
layer_structure
[
i
+
1
])))
# Add dropout
if
use_dropout
:
p
=
0.5
if
0
<=
i
<=
len
(
layer_structure
)
-
3
else
0.2
linears
.
append
(
torch
.
nn
.
Dropout
(
p
=
p
))
# Add dropout expect last layer
if
use_dropout
and
i
<
len
(
layer_structure
)
-
3
:
linears
.
append
(
torch
.
nn
.
Dropout
(
p
=
0.3
))
self
.
linear
=
torch
.
nn
.
Sequential
(
*
linears
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment