Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FAC69
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Lanzendörfer
FAC69
Commits
7f68d353
Commit
7f68d353
authored
10 months ago
by
David Lanzendörfer
Browse files
Options
Downloads
Patches
Plain Diff
Add training for RNN during backprop
parent
0fa5860d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/rtl/neuron.v
+15
-4
15 additions, 4 deletions
src/rtl/neuron.v
with
15 additions
and
4 deletions
src/rtl/neuron.v
+
15
−
4
View file @
7f68d353
...
@@ -101,7 +101,7 @@ module neuron #(
...
@@ -101,7 +101,7 @@ module neuron #(
else
else
if
(
!
backprop_done
&&
backprop_running
)
if
(
!
backprop_done
&&
backprop_running
)
begin
begin
// Adjust normal weights
if
(
regidx
<
NUMBER_SYNAPSES
)
if
(
regidx
<
NUMBER_SYNAPSES
)
begin
begin
if
(
backprop_in_port_store
[
regidx
]
&&
neuron_output
)
begin
if
(
backprop_in_port_store
[
regidx
]
&&
neuron_output
)
begin
...
@@ -113,15 +113,26 @@ module neuron #(
...
@@ -113,15 +113,26 @@ module neuron #(
end
end
regidx
<=
regidx
+
1
;
regidx
<=
regidx
+
1
;
end
end
// Adjust RNN weights
else
if
(
regidx
==
NUMBER_SYNAPSES
)
else
if
(
regidx
<
NUM_WEIGHTS
)
begin
if
(
rnn_inputs
[
regidx
]
&&
neuron_output
)
begin
RNNW
[
regidx
-
NUMBER_SYNAPSES
]
<=
$
signed
(
RNNW
[
regidx
-
NUMBER_SYNAPSES
])
-
$
signed
(
dw
);
end
else
if
(
rnn_inputs
[
regidx
]
&&
!
neuron_output
)
begin
RNNW
[
regidx
-
NUMBER_SYNAPSES
]
<=
$
signed
(
RNNW
[
regidx
-
NUMBER_SYNAPSES
])
+
$
signed
(
dw
);
end
regidx
<=
regidx
+
1
;
end
// Reset the redister index counter
else
if
(
regidx
==
NUM_WEIGHTS
)
begin
begin
//$display("Backprop done");
//$display("Backprop done");
backprop_done
<=
1
;
backprop_done
<=
1
;
backprop_running
<=
0
;
backprop_running
<=
0
;
regidx
<=
0
;
regidx
<=
0
;
end
end
end
end
else
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment