Skip to content

1st Working Model Notes

KLi447 edited this page Apr 5, 2022 · 4 revisions

Model is an LSTM with 128 cells to a Dense layer with 2 outputs. The model tracks 4 metrics: training loss, training accuracy, validation loss, and validation accuracy. Loss is mean squared error and accuracy is mean absolute percentage error. The optimizer used is Adam because it's a good general-purpose optimizer.
image Input shape to the model is a tensor of shape (num_samples, 5, 2), where 5 corresponds to the number of timesteps and 2 corresponds to the latitude and longitude at the timestep. Output shape from the first layer is a tensor of shape (num_samples, 128), where 128 corresponds to the number of LSTM cells in the model. The final output shape from the model is a tensor of shape (num_samples, 2), where 2 is the latitude and longitude guess for the timestep after the input samples. For all layers, num_samples can be modified using the TensorFlow batch_size and will not affect model performance. The training label tensor is of shape (num_smaples, 2), where 2 is the ground truth latitude and longitude value for the timestep after the input sequence.
An example run of the model over 30 epochs is shown below (takes about 26ms per step, 43 steps per epoch):
Train loss:
image
Validation loss:
image
Training error:
image
Validation error:
image
Evaluating the model on larger dataset:
image

Clone this wiki locally