Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Rink
python
Commits
82a04e31
Commit
82a04e31
authored
3 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
minor
parent
b828a3d7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/deeplearning/icing_cnn.py
+11
-11
11 additions, 11 deletions
modules/deeplearning/icing_cnn.py
with
11 additions
and
11 deletions
modules/deeplearning/icing_cnn.py
+
11
−
11
View file @
82a04e31
...
...
@@ -217,17 +217,17 @@ class IcingIntensityNN:
tf
.
debugging
.
set_log_device_placement
(
LOG_DEVICE_PLACEMENT
)
gpus
=
tf
.
config
.
experimental
.
list_physical_devices
(
'
GPU
'
)
if
gpus
:
try
:
# Currently, memory growth needs to be the same across GPUs
for
gpu
in
gpus
:
tf
.
config
.
experimental
.
set_memory_growth
(
gpu
,
True
)
logical_gpus
=
tf
.
config
.
experimental
.
list_logical_devices
(
'
GPU
'
)
print
(
len
(
gpus
),
"
Physical GPUs,
"
,
len
(
logical_gpus
),
"
Logical GPUs
"
)
except
RuntimeError
as
e
:
# Memory growth must be set before GPUs have been initialized
print
(
e
)
#
gpus = tf.config.experimental.list_physical_devices('GPU')
#
if gpus:
#
try:
#
# Currently, memory growth needs to be the same across GPUs
#
for gpu in gpus:
#
tf.config.experimental.set_memory_growth(gpu, True)
#
logical_gpus = tf.config.experimental.list_logical_devices('GPU')
#
print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
#
except RuntimeError as e:
#
# Memory growth must be set before GPUs have been initialized
#
print(e)
def
get_in_mem_data_batch
(
self
,
idxs
,
is_training
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment