Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in running basic_example.ipynb #2

Open
boxaio opened this issue Jun 5, 2023 · 1 comment
Open

error in running basic_example.ipynb #2

boxaio opened this issue Jun 5, 2023 · 1 comment

Comments

@boxaio
Copy link

boxaio commented Jun 5, 2023

in running the cell "Fitting a Pure Prediction RC" , an error occured:

e:\Anaconda3\envs\RCTorch\lib\site-packages\rctorch\rc.py in fit(self, y, X, burn_in, criterion, return_states, optimizer, out_weights, ODE_order, SOLVE, reparam_f, init_conditions, force, ode_coefs, train_score, ODE_criterion, q, eq_system, backprop_f, epochs, nl, n_inputs, n_outputs, random_sampling, sample_timepoints, verbose, backprop_args)
822 # append columns for the data:
823 self.extended_states = torch.cat((self.X, self.states), axis = 1)
--> 824 # self.extended_states = torch.hstack((self.X, self.states))
825
826 self.laststate = self.states[-1, :]

RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 239 but got size 56883 for tensor number 1 in the list.

it is found that the shape of self.X and the shape of self.states does not match at all

@fairycloudsi
Copy link

the same issue. I got missing matching in RC.fit.
my_rc.fit(X = force_train, y = target_train)
File "/data/conda/RcTorch/lib/python3.8/site-packages/rctorch/rc.py", line 839, in fit
self.extended_states = torch.cat((self.X, self.states), axis = 1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 2399 but got size 5752803 for tensor number 1 in the list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants