Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrei-Claudiu Roibu
BrainMapper
Commits
ea6e15b8
Commit
ea6e15b8
authored
Mar 25, 2020
by
Andrei-Claudiu Roibu
🖥
Browse files
added test for parameters being on stored on GPU
parent
c2c88a53
Changes
1
Hide whitespace changes
Inline
Side-by-side
BrainMapperUNet.py
View file @
ea6e15b8
...
@@ -120,9 +120,27 @@ class BrainMapperUNet(nn.Module):
...
@@ -120,9 +120,27 @@ class BrainMapperUNet(nn.Module):
print
(
"Saving Model... {}"
.
format
(
path
))
print
(
"Saving Model... {}"
.
format
(
path
))
torch
.
save
(
self
,
path
)
torch
.
save
(
self
,
path
)
@
property
def
test_if_cuda
(
self
):
"""Cuda Test
This function tests if the model parameters are allocated to a CUDA enabled GPU.
Args:
None
Returns:
bool: Flag indicating True if the tensor is stored on the GPU and Flase otherwhise
Raises:
None
"""
return
next
(
self
.
parameters
()).
is_cuda
def
predict
(
self
,
X
):
def
predict
(
self
,
X
):
"""
"""
Post-training Output Prediction
Description
Description
"""
"""
return
None
return
None
...
...
Write
Preview
Supports
Markdown
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