Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
Basedformer
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
Basedformer
Commits
188c98ed
Commit
188c98ed
authored
Jun 17, 2022
by
Arda Cihaner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resnet config fix
parent
dcd0bba5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
basedformer/models/base_image.py
basedformer/models/base_image.py
+1
-2
basedformer/models/resnet.py
basedformer/models/resnet.py
+2
-2
basedformer/models/vit.py
basedformer/models/vit.py
+2
-2
No files found.
basedformer/models/base_image.py
View file @
188c98ed
...
...
@@ -2,11 +2,10 @@ import torch.nn as nn
from
dotmap
import
DotMap
class
BaseVisionModel
(
nn
.
Module
):
def
__init__
(
self
,
user_config
):
def
__init__
(
self
,
user_config
,
**
kwargs
):
super
()
.
__init__
()
self
.
user_config
=
user_config
self
.
config
=
self
.
configure_model
()
config
=
self
.
config
def
configure_model
(
self
):
full_config
=
{}
...
...
basedformer/models/resnet.py
View file @
188c98ed
...
...
@@ -51,13 +51,13 @@ class ResBlockBottleNeck(nn.Module):
class
ResNet
(
base_image
.
BaseVisionModel
):
def
__init__
(
self
)
->
None
:
def
__init__
(
self
,
user_config
,
**
kwargs
)
->
None
:
self
.
default_config
=
{
'in_channels'
:
3
,
'network_size'
:
18
,
#ResNet18/34/50/101/152
'n_class'
:
100
}
super
()
.
__init__
(
self
.
default_config
)
super
()
.
__init__
(
user_config
,
**
kwargs
)
network_config_dict
=
{
18
:
(
False
,
(
2
,
2
,
2
,
2
)),
34
:
(
False
,
(
3
,
4
,
6
,
3
)),
...
...
basedformer/models/vit.py
View file @
188c98ed
...
...
@@ -127,8 +127,8 @@ class VisionTransformer(base_image.BaseVisionModel):
'activation'
:
torch
.
nn
.
GELU
(),
'image_size'
:
(
224
,
224
),
'eps'
:
1e-5
,
'device'
:
torch
.
device
(
'c
pu
'
),
'dtype'
:
torch
.
float
32
,
'device'
:
torch
.
device
(
'c
uda
'
),
'dtype'
:
torch
.
float
16
,
}
super
()
.
__init__
(
self
.
default_config
)
self
.
embed
=
ViTEmbeds
(
self
.
config
)
...
...
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