hellozhuo/dgc

Is there a mistake in computing the topk_maxmum ?

Opened this issue · 1 comments

Hi, topk_maxmum, _ = mask_d.topk(inactive_channels, dim=1, largest=False, sorted=False), (in 120 lines, layers.py)

the author wants to obtain the top k values, however, the above code is not. if there are any errors?

https://github.com/zhuogege1943/dgc/blob/86befbd7f7b685ab3bbfafcd027ca3551dda48e9/layers.py#L118-L123

In the original code, we use topk to find the k smallest values in line 120, and mask out those values (assign them to 0) in lines 121-123.