필터 지우기
필터 지우기

Neural Network Batch Training by calling train multiple times

조회 수: 5 (최근 30일)
Manos Kav
Manos Kav 2018년 5월 30일
댓글: Ana Guerra Langan 2019년 11월 19일
Hello,
I have a huge dataset and I want to train my neural network using GPU. Unfortunatelly, I run out of memmory if I try to train it using the entire dataset. Is it the same If I train the network multiple times using mini-batches from the dataset or will the network just learn the last mini-batch?
I am using a custom neural network and train() function for the training.
Thanks in advance.

답변 (1개)

Aditya Salveru
Aditya Salveru 2018년 5월 31일
편집: Aditya Salveru 2018년 5월 31일
Hi,
Your machine is running out of memory as you trying to train network with entire data set at once.
I would suggest you to use mini-batches, for example mini batch gradient descent and also select the batch size appropriately to reduce the risk of running out of memory.
It is same as training the network with entire data set at once.
You can find more information about training parameters here.
Thank you.
Aditya Salveru.
  댓글 수: 2
Manos Kav
Manos Kav 2018년 5월 31일
Thanks for your response. I am using custom neural network. I am creating it with the network() function. Unfortunatelly, it can't be trained with trainNetwork function, but with the train function. So I am looking for mini-batch training with the train function.
Ana Guerra Langan
Ana Guerra Langan 2019년 11월 19일
Did you find a way to do it in the end? I have the same problem at the moment and trying to figure out how to proceed...
  • Should I manually create a loop for each batch of data and run the train inside it for each batch for say 100 epochs each and then use the trained network as input for the next batch?
  • Should I just move to deep learning even though my data has nothing to do with images and I don't think I need an architecture that is that deep?
  • Or should I run the batch loop for just one single epoch adn then repeat this for so many iterations?
I'm also not sure how to deal with the validation set, since I have a separate batch of data for validation...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by