我收到以下错误。
AttributeError:不能在模块之前分配模块。初始化()调用
我有一堂课如下。
class Classifier(nn.Module):
def __init__(self, dictionary, embeddings_index, max_seq_length, args):
self.embedding = EmbeddingLayer(len(dictionary), args.emsize, args.dropout)
self.drop = nn.Dropout(args.dropout)
我在这里做错了什么?我是 PyTorch 的初学者,请帮忙!