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
Show 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,
...
@@ -58,6 +58,9 @@ extern "C" void scn_D_(setInputSpatialLocations)(void **m,
THLongTensor
*
locations
,
THLongTensor
*
locations
,
THFloatTensor
*
vecs
,
THFloatTensor
*
vecs
,
bool
overwrite
)
{
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
assert
(
locations
->
size
[
0
]
==
vecs
->
size
[
0
]
and
"Location.size(0) and vecs.size(0) must be equal!"
);
"Location.size(0) and vecs.size(0) must be equal!"
);
assert
((
locations
->
size
[
1
]
==
Dimension
or
assert
((
locations
->
size
[
1
]
==
Dimension
or
...
@@ -125,7 +128,7 @@ extern "C" void scn_D_(getSpatialLocations)(void **m, THLongTensor *spatialSize,
...
@@ -125,7 +128,7 @@ extern "C" void scn_D_(getSpatialLocations)(void **m, THLongTensor *spatialSize,
}
}
}
}
extern
"C"
void
extern
"C"
void
scn_D_
(
createMetadataForDenseToSparse
)(
void
**
m
,
THLongTensor
*
spatialSize_
,
scn_D_
(
createMetadataForDenseToSparse
)(
void
**
m
,
THLongTensor
*
spatialSize_
,
THLongTensor
*
nz_
,
long
batchSize
)
{
THLongTensor
*
nz_
,
long
batchSize
)
{
SCN_INITIALIZE_AND_REFERENCE
(
Metadata
<
Dimension
>
,
m
)
SCN_INITIALIZE_AND_REFERENCE
(
Metadata
<
Dimension
>
,
m
)
_m
.
clear
();
_m
.
clear
();
...
...
PyTorch/sparseconvnet/__init__.py
View file @
cd5f3fc1
...
@@ -13,6 +13,7 @@ from .classificationTrainValidate import ClassificationTrainValidate
...
@@ -13,6 +13,7 @@ from .classificationTrainValidate import ClassificationTrainValidate
from
.convolution
import
Convolution
from
.convolution
import
Convolution
from
.deconvolution
import
Deconvolution
from
.deconvolution
import
Deconvolution
from
.denseToSparse
import
DenseToSparse
from
.denseToSparse
import
DenseToSparse
from
.dropout
import
Dropout
,
BatchwiseDropout
from
.identity
import
Identity
from
.identity
import
Identity
from
.inputBatch
import
InputBatch
from
.inputBatch
import
InputBatch
from
.maxPooling
import
MaxPooling
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