Hello All
I have been trying to profile various two-layer CNN and I find my RAM increasing linearly. I have attached my profiling code snippet. Is there something which I can do to reduce RAM access?
for i in range(len(twopair)):
model = nn.Sequential(nn.Conv2d(input_channels, twopair[i][0], kernel, stride, padding, bias=False),
nn.Conv2d(twopair[i][0], twopair[i][1], kernel, stride, padding, bias=False))
time = []
for j in range(ExpEpoch):
x = torch.randn([batch_size, input_channels, input_dim, input_dim])
with torch.autograd.profiler.profile() as prof:
y = model(x)
time.append(prof.self_cpu_time_total)
Thanks in advance for any replies!