Hi, below is my definition of network:
class CNN_Text(nn.Module):
def __init__(self, args):
super(CNN_Text,self).__init__()
self.args = args
V = args.embed_num
D = args.embed_dim
C = args.class_num
Ci = 1
Co = args.kernel_num
Ks = args.kernel_sizes
self.embed = nn.Embedding(V, D)
self.convs1 = [nn.Conv2d(Ci, Co, (K, D)) for K in Ks]
self.dropout = nn.Dropout(args.dropout)
self.fc1 = nn.Linear(len(Ks)*Co, C)
However, when i called cuda() on the model, the modules in the list self.convs1 will not shift to the GPU, how to solve this problem, any ideas ?