path_unlabeled = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary\\unlabeled_X.bin' path_labels_name = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary\\class_names.txt' path_save_directory = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary\\new\\new' # Read images (train images) # x_train = read_all_images(path_train_x) # convert images to gray flatten # x_train = images_gray_falt_version(images=x_train) # convert type # x_train = x_train.astype('float32') / 255. # print(x_train.shape, type(x_train)) # Read images (test images) x_test = read_all_images(path_test_x) # convert images to gray flatten x_test = images_gray_falt_version(images=x_test) # convert type x_test = x_test.astype('float32') / 255. print(x_test.shape, type(x_test)) # Read images (unlabeled images) x_unlabel = read_all_images(path_unlabeled) # convert images to gray flatten x_unlabel = images_gray_falt_version(images=x_unlabel) # convert type x_unlabel = x_unlabel.astype('float32') / 255. print(x_unlabel.shape, type(x_unlabel)) # Read labels (train) # y_train = read_labels(path_train_y) # print(y_train.shape)
# Read Dataset ################################################################################# # dataset paths path_dataset = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary' path_train_x = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary\\train_X.bin' path_train_y = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary\\train_y.bin' path_test_x = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary\\test_X.bin' path_test_y = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary\\test_y.bin' path_unlabeled = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary\\unlabeled_X.bin' path_labels_name = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary\\class_names.txt' path_save_directory = 'D:\\ANN\\dataset\\stl10_binary\\stl10_binary\\new\\new' # Read images (train images) x_train = read_all_images(path_train_x) # convert images to gray flatten x_train = images_gray_falt_version(images=x_train) # convert type x_train = x_train.astype('float32') / 255. print(x_train.shape, type(x_train)) # Read images (test images) x_test = read_all_images(path_test_x) # convert images to gray flatten x_test = images_gray_falt_version(images=x_test) # convert type x_test = x_test.astype('float32') / 255. print(x_test.shape, type(x_test)) # Read labels (train) y_train = read_labels(path_train_y) print(y_train.shape)