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

Need to skip incomplete batches #31

Open
andreped opened this issue Jun 8, 2022 · 0 comments
Open

Need to skip incomplete batches #31

andreped opened this issue Jun 8, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@andreped
Copy link
Member

andreped commented Jun 8, 2022

Currently, it is possible to run batch inference using the ImageToBatch process object.

However, if we want to take advantage of the temporal dimension, for instance if your model includes the TimeDistributed layer in Keras.

To get that working with FAST, we need to do a simple trick in the model, where we transpose the batch and temporal dimensions. That way, when generating a batch of 20, we are actually using 20 patches in a bag or sequence.

However, this might fail, if the model has a fixed size on the temporal dimension, and I think it is only relevant for the last batch, which can be incomplete. I believe FAST still sends it to the network, but it might be a good idea to have an option to disregard the last batch (or incomplete batches), if it occures. To account for this potential problem.

However, in my scenario, I had trained my model with None shape for the temporal axis, so it did not prompt any errors, but if the model is trained on a bag size of a 100 patches, you might not want to give it 6 patches, as the results might be poor.

@andreped andreped added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant