Solved by Usama_Hasan in post #2 
              
              
                Hy @Mughees , I hope I understand this correctly, 
When I run this. 
samples = torch.FloatTensor([74891,11865,194148,98997,29350,104203,130637,30649,141300,164775,176567,16267,148950,1536,12022,22100,1566,67277,74877])
a = torch.tensor(1).float() 
step1 = torch.log2(torch.max(samples)/samples)
step2…