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
cd5f3fc1
Commit
cd5f3fc1
authored
Feb 22, 2018
by
Benjamin Thomas Graham
Browse files
setLocations input shape
parent
1eb86da8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
PyTorch/sparseconvnet/SCN/generic/Geometry/Metadata.cpp
PyTorch/sparseconvnet/SCN/generic/Geometry/Metadata.cpp
+5
-2
PyTorch/sparseconvnet/__init__.py
PyTorch/sparseconvnet/__init__.py
+1
-0
No files found.
PyTorch/sparseconvnet/SCN/generic/Geometry/Metadata.cpp
View file @
cd5f3fc1
...
...
@@ -58,6 +58,9 @@ extern "C" void scn_D_(setInputSpatialLocations)(void **m,
THLongTensor
*
locations
,
THFloatTensor
*
vecs
,
bool
overwrite
)
{
assert
(
features
->
nDimension
==
2
and
"features must be 2 dimensional!"
);
assert
(
locations
->
nDimension
==
2
and
"locations must be 2 dimensional!"
);
assert
(
vecs
->
nDimension
==
2
and
"vecs must be 2 dimensional!"
);
assert
(
locations
->
size
[
0
]
==
vecs
->
size
[
0
]
and
"Location.size(0) and vecs.size(0) must be equal!"
);
assert
((
locations
->
size
[
1
]
==
Dimension
or
...
...
@@ -125,8 +128,8 @@ extern "C" void scn_D_(getSpatialLocations)(void **m, THLongTensor *spatialSize,
}
}
extern
"C"
void
scn_D_
(
createMetadataForDenseToSparse
)(
void
**
m
,
THLongTensor
*
spatialSize_
,
THLongTensor
*
nz_
,
long
batchSize
)
{
scn_D_
(
createMetadataForDenseToSparse
)(
void
**
m
,
THLongTensor
*
spatialSize_
,
THLongTensor
*
nz_
,
long
batchSize
)
{
SCN_INITIALIZE_AND_REFERENCE
(
Metadata
<
Dimension
>
,
m
)
_m
.
clear
();
_m
.
setInputSpatialSize
(
spatialSize_
);
...
...
PyTorch/sparseconvnet/__init__.py
View file @
cd5f3fc1
...
...
@@ -13,6 +13,7 @@ from .classificationTrainValidate import ClassificationTrainValidate
from
.convolution
import
Convolution
from
.deconvolution
import
Deconvolution
from
.denseToSparse
import
DenseToSparse
from
.dropout
import
Dropout
,
BatchwiseDropout
from
.identity
import
Identity
from
.inputBatch
import
InputBatch
from
.maxPooling
import
MaxPooling
...
...
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