Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
SparseConvNet
Commits
ce2e18d7
"...git@developer.sourcefind.cn:OpenDAS/openpcdet.git" did not exist on "d471a69333808e1ad88e47774b9ce32e89bd7d9b"
Commit
ce2e18d7
authored
Dec 02, 2020
by
Benjamin Thomas Graham
Browse files
spatial size calc for activations
parent
159e5f9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
sparseconvnet/activations.py
sparseconvnet/activations.py
+12
-1
No files found.
sparseconvnet/activations.py
View file @
ce2e18d7
...
@@ -20,7 +20,8 @@ class Sigmoid(Module):
...
@@ -20,7 +20,8 @@ class Sigmoid(Module):
output
.
metadata
=
input
.
metadata
output
.
metadata
=
input
.
metadata
output
.
spatial_size
=
input
.
spatial_size
output
.
spatial_size
=
input
.
spatial_size
return
output
return
output
def
input_spatial_size
(
self
,
out_size
):
return
out_size
class
LeakyReLU
(
Module
):
class
LeakyReLU
(
Module
):
def
__init__
(
self
,
leak
=
1
/
3
):
def
__init__
(
self
,
leak
=
1
/
3
):
...
@@ -32,6 +33,8 @@ class LeakyReLU(Module):
...
@@ -32,6 +33,8 @@ class LeakyReLU(Module):
output
.
metadata
=
input
.
metadata
output
.
metadata
=
input
.
metadata
output
.
spatial_size
=
input
.
spatial_size
output
.
spatial_size
=
input
.
spatial_size
return
output
return
output
def
input_spatial_size
(
self
,
out_size
):
return
out_size
class
Tanh
(
Module
):
class
Tanh
(
Module
):
...
@@ -41,6 +44,8 @@ class Tanh(Module):
...
@@ -41,6 +44,8 @@ class Tanh(Module):
output
.
metadata
=
input
.
metadata
output
.
metadata
=
input
.
metadata
output
.
spatial_size
=
input
.
spatial_size
output
.
spatial_size
=
input
.
spatial_size
return
output
return
output
def
input_spatial_size
(
self
,
out_size
):
return
out_size
class
ReLU
(
Module
):
class
ReLU
(
Module
):
...
@@ -50,6 +55,8 @@ class ReLU(Module):
...
@@ -50,6 +55,8 @@ class ReLU(Module):
output
.
metadata
=
input
.
metadata
output
.
metadata
=
input
.
metadata
output
.
spatial_size
=
input
.
spatial_size
output
.
spatial_size
=
input
.
spatial_size
return
output
return
output
def
input_spatial_size
(
self
,
out_size
):
return
out_size
class
ELU
(
Module
):
class
ELU
(
Module
):
...
@@ -59,6 +66,8 @@ class ELU(Module):
...
@@ -59,6 +66,8 @@ class ELU(Module):
output
.
metadata
=
input
.
metadata
output
.
metadata
=
input
.
metadata
output
.
spatial_size
=
input
.
spatial_size
output
.
spatial_size
=
input
.
spatial_size
return
output
return
output
def
input_spatial_size
(
self
,
out_size
):
return
out_size
class
SELU
(
Module
):
class
SELU
(
Module
):
def
forward
(
self
,
input
):
def
forward
(
self
,
input
):
...
@@ -67,6 +76,8 @@ class SELU(Module):
...
@@ -67,6 +76,8 @@ class SELU(Module):
output
.
metadata
=
input
.
metadata
output
.
metadata
=
input
.
metadata
output
.
spatial_size
=
input
.
spatial_size
output
.
spatial_size
=
input
.
spatial_size
return
output
return
output
def
input_spatial_size
(
self
,
out_size
):
return
out_size
def
BatchNormELU
(
nPlanes
,
eps
=
1e-4
,
momentum
=
0.9
):
def
BatchNormELU
(
nPlanes
,
eps
=
1e-4
,
momentum
=
0.9
):
return
sparseconvnet
.
Sequential
().
add
(
BatchNormalization
(
nPlanes
,
eps
,
momentum
)).
add
(
ELU
())
return
sparseconvnet
.
Sequential
().
add
(
BatchNormalization
(
nPlanes
,
eps
,
momentum
)).
add
(
ELU
())
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