Skip to content

Commit

Permalink
delete tensorflow memory limit. Just use memory growths setting
Browse files Browse the repository at this point in the history
  • Loading branch information
tandav committed Mar 31, 2023
1 parent 99873e7 commit d414904
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions pitch_detectors/algorithms/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ def __init__(self) -> None:
def set_memory_limit(self) -> None:
if TensorflowGPU.memory_limit_initialized:
return
memory_limit = int(os.environ.get('PITCH_DETECTORS_GPU_MEMORY_LIMIT', 8192))
gpus = self.gpus
for gpu in gpus:
self.tf.config.experimental.set_memory_growth(gpu, True)
self.tf.config.experimental.set_virtual_device_configuration(gpu, [self.tf.config.experimental.VirtualDeviceConfiguration(memory_limit=memory_limit)])
TensorflowGPU.memory_limit_initialized = True

@property
Expand Down

0 comments on commit d414904

Please sign in to comment.