'PackedSequence' object has no attribute 'size' error with ...
discuss.pytorch.org › t › packedsequence-object-hasNov 11, 2020 · def __init__(self, vocab_size, embedding_dim, hidden_dim, output_dim, n_layers, bidirectional, dropout, pad_idx): super().__init__() self.n_layers = n_layers self.embedding_dim = embedding_dim self.hidden_dim = hidden_dim # Number of time steps self.sequence_len = 3 self.embedding = nn.Embedding(vocab_size, embedding_dim, padding_idx = pad_idx ...
PackedSequence — PyTorch 1.10.1 documentation
pytorch.org › docs › stable~PackedSequence.data – Tensor containing packed sequence ~PackedSequence.batch_sizes – Tensor of integers holding information about the batch size at each sequence step ~PackedSequence.sorted_indices (Tensor, optional) – Tensor of integers holding how this PackedSequence is constructed from sequences.