Skip to content

How to prepare training data, especially the size ? #2

@JosephDeepIntelli

Description

@JosephDeepIntelli

I have a batch of time serial data for regression analysis. Every timestamp has 30 features. At the beginning data are prepared as numpy ndarries. Then, I transform them into tensor datasets and set the batch_size=15 for data loader, just like this:

data_tensors = TensorDataset(torch.Tensor(x_tr), torch.Tensor(y_tr))

loader_tr = DataLoader(
            data_tensors, batch_size=batch_size, shuffle=False, num_workers=4)

However, I got an error as follows.

~/miniconda3/envs/py36/lib/python3.6/site-packages/echotorch/nn/ESNCell.py in forward(self, u, y, w_out)
    128 
    129                 # Compute input layer
--> 130                 u_win = self.w_in.mv(ut)
    131 
    132                 # Apply W to x

RuntimeError: mv: Expected 1-D argument vec, but got 0-D

It looks like the forward method need parameter "u" to be a 3-D tensor, and time_length need to be set explicitly. Is the time_length mean the number of reservoirs ? but we already have the hidden_dim.

I am quite confused about how to prepare the training data for LiESN. Could you please help me?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions