Non-local_pytorch
Non-local_pytorch copied to clipboard
Implementation of Non-local Block.
Traceback (most recent call last): File "nl_map_save.py", line 20, in net.load_state_dict(torch.load('weights/net.pth')) File "/home/user/anaconda3/envs/TEST2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1045, in load_state_dict self.__class__.__name__, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for Network: Missing key(s) in state_dict:...
If non-local is applied to the low-level feature map, CUDA out of memory will happen.Is this due to the amount of memory required to compute the Attention matrix? Looking forward...
想问一下,在non_local_embedded_gaussian.py实现文件中,我并没有发现Embedded Gaussian的具体表达式,只是有矩阵乘法+softmax函数...如果是Embedded Gaussian的实现,具体是哪几行代码实现呢? https://github.com/AlexHex7/Non-local_pytorch/blob/39ad90c91538d34e88865c9fb0ce4a844751346c/lib/non_local_embedded_gaussian.py#L85 https://github.com/AlexHex7/Non-local_pytorch/blob/39ad90c91538d34e88865c9fb0ce4a844751346c/lib/non_local_embedded_gaussian.py#L86
I want to embed this non-local code in my framework, but when I run my code, the following error will occur: > File "/home/Global/models/non_local_embeded_gaussian.py", line 102, in __init__ > super(NONLocalBlock2D,...
理解热力图
你好,我也想问一下如何去理解热力图,看了paper还是不太理解~,希望能解答一下~
您好,我用点积版本的non_local对f进行softmax之后, f = torch.matmul(theta_x, phi_x) N = f.size(-1) f_div_C = f / N sft = nn.Softmax(dim=2) f_div_C = sft(f_div_C) 在可视化时还需要对NL_MAP进行normalize吗?如果需要,应该如何normalize呢? 现在我的热图结果只有一个box,看不到正常热图颜色的变化,这是什么原因呢?
SO if I want to add nonblock into my own experiment I can only add NONLocalBlock2D() into somewhere of the network ? and I did't need to change other params...
Hi, why can a heat map be generated?? I don't understant visualization of non-local. Are there any references available?
我把non-local 用在reid上面的,在resnet50的前三个layers后面都接了non-local层。用1000个ID进行训练是发现能提高一个点,而且收敛速度比原来快,但是当我用5000个ID训练时发现结果比原来低了一个多点。是不是有哪些参数我需要再调一下?烦请解答哦 PS:我没有发现其他网友提出的W权重为0的情况,我这边W还是挺正常的
https://github.com/facebookresearch/video-nonlocal-net/issues/58 Please refer to this issue.