Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
software
neural_filters
Commits
ea285b4c
Commit
ea285b4c
authored
Aug 23, 2019
by
François MARELLI
Browse files
Register parameters for dict saving/loading.
parent
86fe8641
Changes
3
Hide whitespace changes
Inline
Side-by-side
neural_filters/neural_filter.py
View file @
ea285b4c
...
...
@@ -34,7 +34,7 @@ class NeuralFilter(torch.nn.Module):
self
.
hidden_size
=
hidden_size
self
.
bias_forget
=
Parameter
(
torch
.
Tensor
(
hidden_size
))
self
.
register_parameter
(
'bias_forget'
,
torch
.
Tensor
(
hidden_size
))
self
.
reset_parameters
()
...
...
neural_filters/neural_filter_2CC.py
View file @
ea285b4c
...
...
@@ -35,8 +35,8 @@ class NeuralFilter2CC(torch.nn.Module):
self
.
hidden_size
=
hidden_size
self
.
bias_theta
=
Parameter
(
torch
.
Tensor
(
hidden_size
))
self
.
bias_modulus
=
Parameter
(
torch
.
Tensor
(
hidden_size
))
self
.
register_parameter
(
'bias_theta'
,
torch
.
Tensor
(
hidden_size
))
self
.
register_parameter
(
'bias_modulus'
,
torch
.
Tensor
(
hidden_size
))
self
.
reset_parameters
()
...
...
setup.py
View file @
ea285b4c
...
...
@@ -2,7 +2,7 @@ from setuptools import setup
setup
(
name
=
'neural-filters'
,
version
=
'0.
1
'
,
version
=
'0.
2
'
,
description
=
'Linear filters for neural networks in pyTorch'
,
author
=
'François Marelli (Idiap research institute)'
,
author_email
=
'francois.marelli@idiap.ch'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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