def preprocessX(mat):
	"""
	unroll input matrices
	:param mat: ndarray, uint8, shape=(num_samples, num_row, num_col)
	:return: ndarray, float32, shape=(num_samples, num_row * num_col)
	"""
	num_samples, num_row, num_col = mat.shape
	vect = mat.reshape(num_samples, num_row * num_col)
	vect_normalized = vect.astype('float32') / 255
	return vect_normalized