Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
modules/hypernetworks/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):
...
@@ -51,10 +51,9 @@ class HypernetworkModule(torch.nn.Module):
if
add_layer_norm
:
if
add_layer_norm
:
linears
.
append
(
torch
.
nn
.
LayerNorm
(
int
(
dim
*
layer_structure
[
i
+
1
])))
linears
.
append
(
torch
.
nn
.
LayerNorm
(
int
(
dim
*
layer_structure
[
i
+
1
])))
# Add dropout
# Add dropout expect last layer
if
use_dropout
:
if
use_dropout
and
i
<
len
(
layer_structure
)
-
3
:
p
=
0.5
if
0
<=
i
<=
len
(
layer_structure
)
-
3
else
0.2
linears
.
append
(
torch
.
nn
.
Dropout
(
p
=
0.3
))
linears
.
append
(
torch
.
nn
.
Dropout
(
p
=
p
))
self
.
linear
=
torch
.
nn
.
Sequential
(
*
linears
)
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