Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Max Ehrlich
cdcnn
Commits
b59d8c91
Verified
Commit
b59d8c91
authored
Dec 03, 2018
by
Max Ehrlich
Browse files
Allow variable number of input channels
parent
20c01fcc
Changes
1
Hide whitespace changes
Inline
Side-by-side
models/spatial_model.py
View file @
b59d8c91
...
...
@@ -3,10 +3,10 @@ from .blocks import SpatialResBlock
class
SpatialResNet
(
nn
.
Module
):
def
__init__
(
self
,
n_classes
):
def
__init__
(
self
,
n_channels
,
n_classes
):
super
(
SpatialResNet
,
self
).
__init__
()
self
.
block1
=
SpatialResBlock
(
in_channels
=
1
,
out_channels
=
16
,
downsample
=
False
)
self
.
block1
=
SpatialResBlock
(
in_channels
=
n_channels
,
out_channels
=
16
,
downsample
=
False
)
self
.
block2
=
SpatialResBlock
(
in_channels
=
16
,
out_channels
=
32
)
self
.
block3
=
SpatialResBlock
(
in_channels
=
32
,
out_channels
=
64
)
...
...
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