Hi,
I have a simple linear network class in pytorch with 6000 hidden units.
When I call the following lines, it occupies 893MB memory.
device = torch.device(“cuda”)
model = DeepNN().to(device)
where DeepNN is the class name. This initial memory will increase by increasing the number of hidden units.
Wondering what this means and is there any way to fix it?
Update: To give some more information, with a network with nn.Linear(6000,6000) , I expect the initial memory to be 144MB but it is currently 600MB. When I increase the size of hidden units to nn.Linear(30000,30000), I expect the memory to be around 3.5GB but it preoccupies 5GB.