Challenge: Time Series Forecasting with LSTM
Taak
Swipe to start coding
-
Define the
TimeSeriesPredictor
class, completing its__init__
method to set up thenn.LSTM
andnn.Linear
layers, and implement itsforward
method to process input sequences and output a prediction. -
Instantiate the
TimeSeriesPredictor
model, then define thenn.MSELoss
criterion
andtorch.optim.Adam
optimizer
. -
Implement the training and evaluation loops, including forward and backward passes, parameter updates, and loss calculation.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!