def get_test_data()

in src/train.py [0:0]


def get_test_data(test_dir, test_buff, batch_size, anomalyNumber, validNumber):
    
    test_x = np.load(test_dir + '/test_x.npy')
    test_y = np.load(test_dir + '/test_y.npy')
    
    test_x = test_x.astype('float32')
    test_x = test_x / 255
    test_y_one_hot = tf.keras.utils.to_categorical(test_y)

    test_validIdxs = np.where(np.isin(test_y, validNumber))[0] 
    test_anomalyIdxs = np.where(test_y==anomalyNumber)[0]

    test_x_normal = test_x[test_validIdxs]
    test_y_normal = test_y[test_validIdxs]

    test_x_anomaly = test_x[test_anomalyIdxs]
    test_y_anomaly = test_y[test_anomalyIdxs]

    print('test normal x: ', np.shape(test_x_normal))
    print('test normal y: ', np.shape(test_y_normal))
    print('test anomaly x: ', np.shape(test_x_anomaly))
    print('test anomaly y: ', np.shape(test_y_anomaly))
    
    test_x_normal_dataset = (tf.data.Dataset.from_tensor_slices(test_x_normal)).shuffle(test_buff).batch(batch_size)
    test_x_anomaly_dataset = (tf.data.Dataset.from_tensor_slices(test_x_anomaly)).shuffle(test_buff).batch(batch_size)    
    return test_x_normal, test_x_normal_dataset, test_y_normal, test_x_anomaly, test_x_anomaly_dataset, test_y_anomaly