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
ModelZoo
ResNet50_tensorflow
Commits
b13d6e51
Commit
b13d6e51
authored
Jul 27, 2017
by
Dan O'Shea
Browse files
LFADS: Fixing alignment bias bug
parent
7dde2e2f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
lfads/lfads.py
lfads/lfads.py
+9
-3
lfads/utils.py
lfads/utils.py
+1
-1
No files found.
lfads/lfads.py
View file @
b13d6e51
...
...
@@ -409,6 +409,12 @@ class LFADS(object):
dataset
=
datasets
[
name
]
in_mat_cxf
=
dataset
[
'alignment_matrix_cxf'
].
astype
(
np
.
float32
)
if
datasets
and
'alignment_bias_c'
in
datasets
[
name
].
keys
():
dataset
=
datasets
[
name
]
print
(
"Using alignment bias provided for dataset:"
,
name
)
align_bias_c
=
dataset
[
'alignment_bias_c'
].
astype
(
np
.
float32
)
align_bias_1xc
=
np
.
expand_dims
(
align_bias_c
,
axis
=
0
)
out_mat_fxc
=
None
out_bias_1xc
=
None
if
in_mat_cxf
is
not
None
:
...
...
lfads/utils.py
View file @
b13d6e51
...
...
@@ -112,7 +112,7 @@ def init_linear(in_size, out_size, do_bias=True, mat_init_value=None,
'Provided mat_init_value must have shape [%d, %d].'
%
(
in_size
,
out_size
))
if
bias_init_value
is
not
None
and
bias_init_value
.
shape
!=
(
1
,
out_size
):
raise
ValueError
(
'Provided bias_init_value must have shape [1,%d].'
%
(
1
,
out_size
))
'Provided bias_init_value must have shape [1,%d].'
%
(
out_size
,
))
if
mat_init_value
is
None
:
stddev
=
alpha
/
np
.
sqrt
(
float
(
in_size
))
...
...
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