For your handwritten solutions, please scan or take a picture of them. Alternatively, you can write them in markdown if you prefer.
Only .ipynb files will be graded for your code.
Compress all the files into a single .zip file.
Do not submit a printed version of your code, as it will not be graded.
In this problem, you will make a LSTM model to predict the half of an MNIST image using the other half.
You will split an MNIST image into 28 pieces.
MNIST is 28 x 28 image. The model predicts a piece of 1 x 28 image.
First, 14 x 28 image will be feeded into a model as time series, then the model predict the last 14 x 28 image, recursively.
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
(1) Load MNIST Data
## provided
(train_imgs, train_labels), (test_imgs, test_labels) = tf.keras.datasets.mnist.load_data()
train_imgs = train_imgs/255.0
test_imgs = test_imgs/255.0
print('train_x: ', train_imgs.shape)
print('test_x: ', test_imgs.shape)
(2) Plot a ramdomly selected data with its label
## your code here
#
(3) Define LSTM Structure
## your code here
#
(4) Define Cost, Initializer and Optimizer Loss
Initializer
Optimizer
## your code here
#
(5) Define optimization configuration and then optimize
## your code here
#
(6) Test or Evaluate
## your code here
#
In this problem, we have bearing data with 3 classes (healthy, inner fault, outer fault).
The objective is to classify the given data using deep learning models.
Dataset Description
The bearing data is collected by a sensory system which has 2 channels: vibration and rotational speed. You can refer to the paper to see the specification in detail. The experimental setup is shown in the below figure. The dataset contains 36 files with 3 classes, 2 sensor positions, and 4 speed varying conditions. Every data is sampled at 200,000 Hz of sampling frequency and 10 seconds of duration. We will use only the increasing speed condition and the channel 1 (vibration data) for the sake of simplicity.