lfads / lfads-run-manager

Matlab interface for Latent Factor Analysis via Dynamical Systems (LFADS)
https://lfads.github.io/lfads-run-manager
Apache License 2.0
50 stars 29 forks source link

External inputs in the input file #14

Closed azylbertal closed 5 years ago

azylbertal commented 5 years ago

In the input file I'm getting a 'dim x time' matrix of external inputs, instead of 'dim x time x trial' tensor.

I think this is because line 980 in Run.m reads:

externalInputs = seqData{iDS}.externalInputs;

since seqData{iDS} is a struct array with an entry for each trial, this line assigns only the external inputs from the last trial to externalInputs (and thus this is the only one saved later to the LFADS input file).

Unless I'm missing something, this should perhaps be:

externalInputs = cat(3, seqData{iDS}.externalInputs);

cpandar commented 5 years ago

I missed this issue until now. Certainly possible that this issue exists - I imagine there has been little testing of run-manager with external inputs. @djoshea any thoughts here?

djoshea commented 5 years ago

Hey Chethan, sorry missed the notification. I actually fixed this in the dev branch. I'd been using this locally for some time, but hadn't had a chance to test everything out and make sure I hadn't broken anything.

Would you mind checking out the dev branch, testing your normal workflow, and letting me know if you run into any issues? I fixed a few other annoying inconsistencies in this branch as well. https://github.com/lfads/lfads-run-manager/compare/dev

djoshea commented 5 years ago

Fyi, this is fixed in d0c89e05f6136e1480415e48d845901273c44caf