njwm
njwm
楼主修改的程序中最后那个for循环语法错:第0次循环时h_n没有定义
I made a small change like this: h_w_rows = h_w[..., None].expand(h_w.size(0), h_w.size(1),h_v.size(1), ).contiguous() It seems to work. But i am not sure about the results.
Perhaps it is better like this: h_w_rows = h_w[:, None,:].expand(h_w.size(0), h_v.size(1), h_w.size(1)).contiguous()
> > I made a small change like this: h_w_rows = h_w[..., None].expand(h_w.size(0), h_w.size(1),h_v.size(1), ).contiguous() It seems to work. But i am not sure about the results. > > @njwm...