Can I feed a neural network with a "predefined" set of training images at every iteration ?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
M J
el 24 de Sept. de 2020
Comentada: Srivardhan Gadila
el 27 de Oct. de 2020
Hi everyone,
I am working with a convolutional neural network (GoogLeNet) but instead of using classic "full" images, I am working with patches cropped out of the images. In other words, each class contains several images (which are actually subfolders), and each image contains several patches (the png files).
I wrote a simple function that reads n random patches (png files) belonging to m random images at every run, and was wondering how to implement it in the training process. I basically want to use those n randomly generated training png files (minibatch) at every iteration. Should this be done within the "trainNetwork" function?
Is there any question/example that deals with this topic?
Thank you very much.
Best regards
4 comentarios
Sindar
el 25 de Sept. de 2020
I'm sorry, I'm not sure - my familiarity with the problem is shallow. My first thought would be that you want a single training set for every iteration, so you should create the image datastore once and stick with it. (Perhaps increase n? or run multiple times to gather a larger training set)
Respuesta aceptada
Srivardhan Gadila
el 28 de Sept. de 2020
Based on the above information in question & comments I think using the custom training loop would be a good Idea. You can refer to Train Network Using Custom Training Loop & Deep Learning Custom Training Loops for more information.
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Data Workflows en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!