Hello, has anyone figured out how to actually delete a neural network from GPU memory without restarting wolfram desktop? There appears to be a pretty severe memory leak associated with using Neural Network functionality in WL.
For example,
$HistoryLength = 0
MemoryInUse[]
(* 68,363,752 *)
net = NetModel[
"Multi-scale Context Aggregation Net Trained on Cityscapes Data"]
mask = net[ImageResize[CurrentImage[], {128, 128}],
TargetDevice -> "GPU"]
MemoryInUse[]
(* 746866704 *)
ClearAll[mask, net]
ClearSystemCache[]
MemoryInUse[]
(* 746566120 *)
