chunyangL7
chunyangL7
> > @csyhping I modify the variable 'data' in function read_as_3d_array() in im2mesh/utils/binvox_rw.py, by padding zeros until the dimension of it is 32x32x32=32768. > > Hi @YokkaBear , thanks for...
> > > 作者你好,在实际网络中数据都是GPU张量,直接使用注意力就会出现以上错误,我使用attention.cuda()把注意力转为GPU格式还是报错,请问怎么解决呢? > > > > > > 试试在定义网络的时候在后面加上.cuda() > > 比如: from attention.CoTAttention import CoTAttention import torch from torch import nn from torch.nn import functional as F...
> 大佬,您说的将列表 '[]' 替换为 nn.ModuleList()具体怎么实现啊 比如PSA.py文件,如下修改: `class PSA(nn.Module): def __init__(self, channel=512, reduction=4, S=4): super().__init__() self.S = S self.convs = nn.ModuleList() #! 修改 for i in range(S): self.convs.append(nn.Conv2d(channel//S, channel//S, kernel_size=2*(i+1)+1, padding=i+1))...
> > > > > > 大佬,您说的将列表 '[]' 替换为 nn.ModuleList()具体怎么实现啊 > > > > > > 大佬,请问你最终解决了吗?怎么解决这个问题啊 > > 大佬,这个问题请问你解决了嘛 我当时没有解决,然后就没有用这些模块,现在已经不再研究注意力,在这建议找官方代码对比一下。