Training TCN network in batches to predict a continuous variable
Afficher commentaires plus anciens
I am trying to train a ML model with data from 10 different trials in batches (one batch=one trial) in order to preserve the time series nature of the data. Right now the data is stored in cell array (XTrain) with each cell containing the prediction inputs (the 3 accelerometer mesurements for 541 seconds) for all 10 trials and another cell array that contains the correposding continous variable we are trying to predict/output values (a single continous variable for the 541 seconds) stored in (YTrain). The network I am using to train the model is stored in "net" as shown here along with the training options:
options = trainingOptions("adam", ...
MaxEpochs=60, ...
miniBatchSize=1, ...
InputDataFormats="CTB", ...
Plots="training-progress", ...
Metrics="rmse", ...
Verbose=0);
net = trainnet(Xtrain,Ytrain,net,"mse",options)
When I try to train the network with my Traning data in this format it is giving me an error that: Expected input to be of size 3x1, but it is of size 541x1. I am wondering if I need to make a custom loop that trains my network for each trial seperatley (in batches) and how I would go about doing this. Or is there something in the training options that I can change to train my network on all the data from each trial in batches to preserve the time-series for each trial.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!