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
c54569a8
Commit
c54569a8
authored
Mar 06, 2018
by
Benjamin Thomas Graham
Browse files
tidy
parent
43d4e998
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
PyTorch/sparseconvnet/SCN/generic/Geometry/InputLayerRules.h
PyTorch/sparseconvnet/SCN/generic/Geometry/InputLayerRules.h
+0
-1
PyTorch/sparseconvnet/networkInNetwork.py
PyTorch/sparseconvnet/networkInNetwork.py
+2
-3
No files found.
PyTorch/sparseconvnet/SCN/generic/Geometry/InputLayerRules.h
View file @
c54569a8
...
@@ -193,7 +193,6 @@ void blRules(SparseGrids<dimension> &SGs, RuleBook &rules, long *coords,
...
@@ -193,7 +193,6 @@ void blRules(SparseGrids<dimension> &SGs, RuleBook &rules, long *coords,
rule
.
resize
((
maxActive
+
1
)
*
nActive
);
rule
.
resize
((
maxActive
+
1
)
*
nActive
);
#pragma omp parallel for private(I)
#pragma omp parallel for private(I)
for
(
I
=
0
;
I
<
batchSize
;
I
++
)
{
for
(
I
=
0
;
I
<
batchSize
;
I
++
)
{
std
::
cout
<<
omp_get_num_threads
()
<<
"
\n
"
;
auto
&
ors
=
outputRows
[
I
];
auto
&
ors
=
outputRows
[
I
];
auto
rr
=
&
rule
[
SGs
[
I
].
ctr
*
(
maxActive
+
1
)];
auto
rr
=
&
rule
[
SGs
[
I
].
ctr
*
(
maxActive
+
1
)];
for
(
auto
&
row
:
ors
)
{
for
(
auto
&
row
:
ors
)
{
...
...
PyTorch/sparseconvnet/networkInNetwork.py
View file @
c54569a8
...
@@ -19,7 +19,7 @@ class NetworkInNetworkFunction(Function):
...
@@ -19,7 +19,7 @@ class NetworkInNetworkFunction(Function):
weight
,
weight
,
bias
):
bias
):
output_features
=
input_features
.
new
()
output_features
=
input_features
.
new
()
ctx
.
save_forbackward
s
(
input_features
,
ctx
.
save_for
_
backward
(
input_features
,
output_features
,
output_features
,
weight
,
weight
,
bias
)
bias
)
...
@@ -67,8 +67,7 @@ class NetworkInNetwork(Module):
...
@@ -67,8 +67,7 @@ class NetworkInNetwork(Module):
0
,
0
,
std
))
std
))
if
bias
:
if
bias
:
self
.
bias
=
Parameter
(
torch
.
Tensor
(
nOut
).
self
.
bias
=
Parameter
(
torch
.
Tensor
(
nOut
).
zero_
())
_
())
else
:
else
:
self
.
bias
=
None
self
.
bias
=
None
...
...
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