Jetson nano freezes when training a Keras model

I am trying to train the Fashion MNIST dataset using a keras model in tensorflow in Jupyter notebook on Jetson nano. When I run the model.fit line to train the model, everything just freezes and the actual training doesn’t even start. Partial code is as below:

model = keras.Sequential([
keras.layers.Flatten(input_shape = (28, 28)),
keras.layers.Dense(128, activation = ‘relu’),
keras.layers.Dense(10, activation = ‘softmax’)
])
model.compile(optimizer = ‘adam’,
loss = ‘sparse_categorical_crossentropy’,
metrics = [‘accuracy’])
model.fit(train_images, train_labels, epochs = 5)

Hi,
Please check the following topic:
https://devtalk.nvidia.com/default/topic/1070273/
Most issues are triggered by insufficient RAM size. Please mount a swap file and try again.