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
19aca522
Commit
19aca522
authored
Sep 19, 2018
by
Benjamin Thomas Graham
Browse files
Fix CPU IOLayers
parent
c9e5e6cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
sparseconvnet/SCN/CPU/IOLayers.cpp
sparseconvnet/SCN/CPU/IOLayers.cpp
+4
-4
No files found.
sparseconvnet/SCN/CPU/IOLayers.cpp
View file @
19aca522
...
...
@@ -15,10 +15,10 @@ void InputLayer_ForwardPass(T *input_features, T *output_features, Int nRows,
Int
row
;
#pragma omp parallel for private(row)
for
(
row
=
0
;
row
<
nRows
;
row
++
)
{
auto
nActive
=
rules
[
0
];
auto
r
=
rules
+
row
*
(
1
+
maxActive
);
auto
nActive
=
r
[
0
];
T
multiplier
=
(
average
and
nActive
>
0
)
?
(
T
)
1
/
nActive
:
(
T
)
1
;
auto
out_f
=
output_features
+
row
*
nPlanes
;
auto
r
=
rules
+
row
*
(
1
+
maxActive
);
for
(
Int
i
=
1
;
i
<=
nActive
;
++
i
)
{
auto
in_f
=
input_features
+
r
[
i
]
*
nPlanes
;
for
(
Int
plane
=
0
;
plane
<
nPlanes
;
plane
++
)
{
...
...
@@ -34,10 +34,10 @@ void InputLayer_BackwardPass(T *d_input_features, T *d_output_features,
Int
row
;
#pragma omp parallel for private(row)
for
(
row
=
0
;
row
<
nRows
;
row
++
)
{
auto
nActive
=
rules
[
0
];
auto
r
=
rules
+
row
*
(
1
+
maxActive
);
auto
nActive
=
r
[
0
];
T
multiplier
=
(
average
and
nActive
>
0
)
?
(
T
)
1
/
nActive
:
(
T
)
1
;
auto
d_out_f
=
d_output_features
+
row
*
nPlanes
;
auto
r
=
rules
+
row
*
(
1
+
maxActive
);
for
(
Int
i
=
1
;
i
<=
nActive
;
++
i
)
{
auto
d_in_f
=
d_input_features
+
r
[
i
]
*
nPlanes
;
for
(
Int
plane
=
0
;
plane
<
nPlanes
;
plane
++
)
...
...
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