Pytorch-Memory-Utils
Pytorch-Memory-Utils copied to clipboard
Why **2
Hi,
I want to ask about your code:
new_tensor_sizes = {(type(x), tuple(x.size()), ts_list.count(x.size()), np.prod(np.array(x.size()))*4/1000**2)
what's the means of **2 operation?
Hi. That's because we will get some number by MB and 1 MB is 1000**2 B (or 1024**2 B). You can take a look at this ~
Hi,why *4 after np.array(x.size()))? did you assume the tensor is in format of FP32?