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
2f6072ed
Commit
2f6072ed
authored
Jul 15, 2018
by
Benjamin Thomas Graham
Browse files
contiguous check
parent
de3743f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
sparseconvnet/inputBatch.py
sparseconvnet/inputBatch.py
+2
-2
No files found.
sparseconvnet/inputBatch.py
View file @
2f6072ed
...
@@ -25,7 +25,7 @@ class InputBatch(SparseConvNetTensor):
...
@@ -25,7 +25,7 @@ class InputBatch(SparseConvNetTensor):
def
set_location
(
self
,
location
,
vector
,
overwrite
=
False
):
def
set_location
(
self
,
location
,
vector
,
overwrite
=
False
):
assert
location
.
min
()
>=
0
and
(
self
.
spatial_size
-
location
).
min
()
>
0
assert
location
.
min
()
>=
0
and
(
self
.
spatial_size
-
location
).
min
()
>
0
self
.
metadata
.
setInputSpatialLocation
(
self
.
metadata
.
setInputSpatialLocation
(
self
.
features
,
location
,
vector
,
overwrite
)
self
.
features
,
location
.
contiguous
(),
vector
.
contiguous
()
,
overwrite
)
def
set_location_
(
self
,
location
,
vector
,
overwrite
=
False
):
def
set_location_
(
self
,
location
,
vector
,
overwrite
=
False
):
self
.
metadata
.
setInputSpatialLocation
(
self
.
metadata
.
setInputSpatialLocation
(
...
@@ -53,7 +53,7 @@ class InputBatch(SparseConvNetTensor):
...
@@ -53,7 +53,7 @@ class InputBatch(SparseConvNetTensor):
l
=
locations
[:,
:
self
.
dimension
]
l
=
locations
[:,
:
self
.
dimension
]
assert
l
.
min
()
>=
0
and
(
self
.
spatial_size
.
expand_as
(
l
)
-
l
).
min
()
>
0
assert
l
.
min
()
>=
0
and
(
self
.
spatial_size
.
expand_as
(
l
)
-
l
).
min
()
>
0
self
.
metadata
.
setInputSpatialLocations
(
self
.
metadata
.
setInputSpatialLocations
(
self
.
features
,
locations
,
vectors
,
overwrite
)
self
.
features
,
locations
.
contiguous
(),
vectors
.
contiguous
()
,
overwrite
)
def
set_locations_
(
self
,
locations
,
vector
,
overwrite
=
False
):
def
set_locations_
(
self
,
locations
,
vector
,
overwrite
=
False
):
self
.
metadata
.
setInputSpatialLocations
(
self
.
metadata
.
setInputSpatialLocations
(
...
...
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