Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.learn.mlp
Commits
2001774d
Commit
2001774d
authored
May 10, 2016
by
Manuel Günther
Browse files
Fixed test (see
#8
)
parent
fbfbfb75
Changes
2
Show whitespace changes
Inline
Side-by-side
bob/learn/mlp/machine.cpp
View file @
2001774d
bob/learn/mlp/test_rprop.py
View file @
2001774d
...
...
@@ -52,7 +52,7 @@ class PythonRProp(Trainer):
weight_updates
=
[
i
*
j
for
(
i
,
j
)
in
zip
(
self
.
previous_derivatives
,
self
.
derivatives
)]
# Iterate over each weight and bias and see what to do:
new_weights
=
machine
.
weights
new_weights
=
[
numpy
.
array
(
w
)
for
w
in
machine
.
weights
]
for
k
,
up
in
enumerate
(
weight_updates
):
for
i
in
range
(
up
.
shape
[
0
]):
for
j
in
range
(
up
.
shape
[
1
]):
...
...
@@ -71,7 +71,7 @@ class PythonRProp(Trainer):
if
self
.
train_biases
:
bias_updates
=
[
i
*
j
for
(
i
,
j
)
in
zip
(
self
.
previous_bias_derivatives
,
self
.
bias_derivatives
)]
new_biases
=
machine
.
biases
new_biases
=
[
numpy
.
array
(
b
)
for
b
in
machine
.
biases
]
for
k
,
up
in
enumerate
(
bias_updates
):
for
i
in
range
(
up
.
shape
[
0
]):
if
up
[
i
]
>
0
:
...
...
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