Skip to content
Snippets Groups Projects
Commit 6abb3d39 authored by Tim Tobias Bauerle's avatar Tim Tobias Bauerle
Browse files

Reduced server GPU memory for Parallel Swarm Learning

parent e4ab5445
Branches
No related tags found
2 merge requests!18Merge in main,!14Experiment configs
......@@ -335,7 +335,14 @@ class DeviceServer:
self._lr_scheduler.step(round_no + 1) # epoch=1
else:
self._lr_scheduler.step()
# delete references and free GPU memory manually
server_batch = None
server_labels = None
server_gradients = None
client_gradients = None
concatenated_client_gradients = None
mean_tensor = None
torch.cuda.empty_cache()
return (
self.node_device.client.get_weights(),
self.get_weights(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment