Closed tarmaac closed 1 year ago
I think that you should consider batch size, which means that X's size needs to be [batch_size, seq_len, num_of_features]. If you still use single training data, maybe take batch_size as 1 and unsqueeze it into size of [1, seq_len, num_of_features] so that the codes will work.
Thanks! I found that I wasnt casting the numpy dataset into a torch tensor before calling the TensorDataset class, now it works.
Hi! Im a bit confused. In the first steps of the train method in vrae.py
Index first element of array to return tensor
this implies selecting the first element of the batch from train loader in that case X we will have only 2 dimensions. since it will only be a single timeseries. (seq_len x num_of_features)
but the following instruction is:
required to swap axes, since dataloader gives output in (batch_size x seq_len x num_of_features)
Where X needs to be a 3 dimensional array thus I got an error (number of dimensions in the tensor input does not match the length of the desired ordering of dimensions i.e. input.dim() = 2 is not equal to len(dims) = 3)
Is this an error ? or am I forgetting something? thanks in advance for your response.