idiap / ESLAM

Apache License 2.0
204 stars 21 forks source link

Number of parameters in Table4 #16

Closed ZhaoCancanCN closed 10 months ago

ZhaoCancanCN commented 10 months ago

Hi Mohammad,

Thank you every much for your great job! About Table 4 in the paper I have some questions. How did you calculate the number of parameters in the table? Is it the memory of the decoder plus the size of the entire scene representation?

I also tried to calculate the memory of scene room0 of Replica in the same way as in table 4, but found that it is much smaller than the size given in table 4 of the paper (6.79MB), and my calculation is only about 4.587MB. Please point out if I have missed something.

Here is how I calculated it and the results.

For decoder:

        model = config.get_model(cfg)
        model.to("cuda:0")
        memory_usage = torch.cuda.memory_allocated()
        print(f"Memory Usage: {memory_usage} bytes",f"{memory_usage/1024**2}MB")

Memory Usage: 14848 bytes 0.014MB

For Embedding if scene:

        memory = 0
        for i in range(len(planes_xy)):
            memory=+planes_xy[i].element_size()* planes_xy[i].nelement()
        for i in range(len(planes_xz)):
            memory=+planes_xz[i].element_size()* planes_xz[i].nelement()
        for i in range(len(planes_yz)):
            memory=+planes_yz[i].element_size()* planes_yz[i].nelement()

        for i in range(len(c_planes_xy)):
            memory=+c_planes_xy[i].element_size()* c_planes_xy[i].nelement()
        for i in range(len(planes_xz)):
            memory=+c_planes_xz[i].element_size()* c_planes_xz[i].nelement()
        for i in range(len(planes_yz)):
            memory=+c_planes_yz[i].element_size()* c_planes_yz[i].nelement()

        print(f"embedding size {memory/1024**2}MB")

embedding size 4.5732421875MB

Thanks a lot in advance! Cancan

MohammadJohari commented 10 months ago

Hi,

Firstly, we report the number of parameters, not the memory usage. Therefore, you can ignore ".element_size()". Secondly, there is a typo in your source code. I believe it should be "+=" not "=+". Hope this clarifies.

Kind regards,