Effacer les filtres
Effacer les filtres

minibatchqueue function cannot generate the expected MiniBatchSize

1 vue (au cours des 30 derniers jours)
Li Ea
Li Ea le 6 Mai 2022
Commenté : Li Ea le 9 Mai 2022
As the title states, when I am using minibatchqueue, the data generated is not the batch size I specified, but the full batch.
Here's a very simple code to illustrate the problem:
t_list = dlarray(0:0.001:2,'CB');
mbq = minibatchqueue( ...
arrayDatastore(t_list), ...
MiniBatchSize=200, ...
Running this code reveals two things that are not as expected:
I don't know what the problem is. Thanks to the technician for paying attention and giving an answer!

Réponse acceptée

Joss Knight
Joss Knight le 6 Mai 2022
You've asked your arrayDatastore to iterate over the rows because that's the default. So as far as arrayDatastore is concerned, you have one row, therefore the maximum number of times you can call read() is 1. Therefore minibatchqueue truncates the MiniBatchSize to 1 because you only have 1 observation.
If you want arrayDatastore to iterate over the columns you need to specify an IterationDimension of 2.
  1 commentaire
Li Ea
Li Ea le 9 Mai 2022
Thank you very much for your answer, my puzzle was solved perfectly!

Connectez-vous pour commenter.

Plus de réponses (0)


En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by