You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a bug, an error in my code, or by design, but my ODE errors out unless input_dim == output_dim at all steps within the f function. For example, if I were to apply the layer nn.Linear(18, 2), I would get the following error:
File "/home/ubuntu/anaconda3/envs/storage-env/lib/python3.9/site-packages/torchdyn/core/neuralde.py", line 93, in forward
t_eval, sol = super().forward(x, t_span)
File "/home/ubuntu/anaconda3/envs/storage-env/lib/python3.9/site-packages/torchdyn/core/problems.py", line 79, in forward
return self.odeint(x, t_span)
File "/home/ubuntu/anaconda3/envs/storage-env/lib/python3.9/site-packages/torchdyn/core/problems.py", line 75, in odeint
return self.autograd_function(self.vf_params, x, t_span)
File "/home/ubuntu/anaconda3/envs/storage-env/lib/python3.9/site-packages/torchdyn/numerics/sensitivity.py", line 37, in forward
t_sol, sol = generic_odeint(problem_type, vf, x, t_span, solver, atol, rtol, interpolator, B,
File "/home/ubuntu/anaconda3/envs/storage-env/lib/python3.9/site-packages/torchdyn/numerics/sensitivity.py", line 24, in generic_odeint
return odeint(vf, x, t_span, solver, atol=atol, rtol=rtol, interpolator=interpolator, return_all_eval=return_all_eval)
File "/home/ubuntu/anaconda3/envs/storage-env/lib/python3.9/site-packages/torchdyn/numerics/odeint.py", line 83, in odeint
return _fixed_odeint(f_, x, t_span, solver)
File "/home/ubuntu/anaconda3/envs/storage-env/lib/python3.9/site-packages/torchdyn/numerics/odeint.py", line 412, in _fixed_odeint
_, x, _ = solver.step(f, x, t, dt)
File "/home/ubuntu/anaconda3/envs/storage-env/lib/python3.9/site-packages/torchdyn/numerics/solvers.py", line 89, in step
k2 = f(t + c[0] * dt, x + dt * (a[0] * k1))
RuntimeError: The size of tensor a (18) must match the size of tensor b (2) at non-singleton dimension 1
This also happens if other dimensions change through pooling operations. I would appreciate any help in resolving this.
The text was updated successfully, but these errors were encountered:
I see. So assuming my neural network operates on a batch of 18-dimensional vectors, how would I plot the flows for this ode? Would I have to run t-SNE on each step of the trajectory to reduce to 2D vectors?
I'm not sure if this is a bug, an error in my code, or by design, but my ODE errors out unless
input_dim == output_dim
at all steps within thef
function. For example, if I were to apply the layernn.Linear(18, 2)
, I would get the following error:This also happens if other dimensions change through pooling operations. I would appreciate any help in resolving this.
The text was updated successfully, but these errors were encountered: