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
Thank you for bringing up the need for multiple inputs! As discussed with @kathyxchen we are planning to support multiple inputs as well as multiple targets. Currently, we have a couple of major updates underway(adding support for parallelized data loading, and improving the support for custom targets) that will involve changes to Sampler and Target, so we plan to introduce it after these updates.
Our current plan for the API change is to support multiple types of output from sampler.sample():
where both input and targets can be either an array or a tuple of arrays. TrainModel will handle the transformation of numpy array to pytorch tensor, and then it's up to the user to make sure Model and Criterion handles the tuple input correctly.
Additionally to the sequence, we'd like to provide some other input (of some different size) to the model. A simple basic example to illustrate:
Do you think we could modify the
_get_batch()
function to return atuple(List[np.ndarray], np.ndarray)
?https://github.com/FunctionLab/selene/blob/master/selene_sdk/train_model.py#L346-L355
Maybe we could wrap the
https://github.com/FunctionLab/selene/blob/master/selene_sdk/train_model.py#L453-L464
into some function, which will return either a single
Tensor
or aList[Tensor]
for the inputs, based on the providedinputs
type? Or would be there a better design solution?The text was updated successfully, but these errors were encountered: