diff --git a/hpvm/projects/keras/src/alexnet.py b/hpvm/projects/keras/src/alexnet.py index d611fc3f801718e05cff37483aecb205f44b53db..9b4d9dfdcab516c1979c354b0fc803396feb3401 100644 --- a/hpvm/projects/keras/src/alexnet.py +++ b/hpvm/projects/keras/src/alexnet.py @@ -64,12 +64,12 @@ class AlexNet_CIFAR10(Benchmark): (X_train, y_train), (X_val, y_val) = cifar10.load_data() X_train = X_train / 255.0 - X_val = X_val / 255.0 + #X_val = X_val / 255.0 mean = np.mean(X_train) std = np.std(X_train) X_train = (X_train - mean) / (std + 1e-7) - X_val = (X_val - mean) / (std + 1e-7) + #X_val = (X_val - mean) / (std + 1e-7) X_test = np.fromfile(MODEL_PARAMS_DIR + '/alexnet_cifar10/test_input.bin', dtype=np.float32) diff --git a/hpvm/projects/keras/src/alexnet2.py b/hpvm/projects/keras/src/alexnet2.py index 9c6c9ec621e558ba19caaa65a411f3e7c7281ff1..554caf06e413f410e303a8dbf8a64ebb47ecf56f 100644 --- a/hpvm/projects/keras/src/alexnet2.py +++ b/hpvm/projects/keras/src/alexnet2.py @@ -63,12 +63,10 @@ class AlexNet2_CIFAR10(Benchmark): (X_train, y_train), (X_val, y_val) = cifar10.load_data() X_train = X_train / 255.0 - X_val = X_val / 255.0 mean = np.mean(X_train) std = np.std(X_train) X_train = (X_train - mean) / (std + 1e-7) - X_val = (X_val - mean) / (std + 1e-7) X_test = np.fromfile(MODEL_PARAMS_DIR + '/alexnet2_cifar10/test_input.bin', dtype=np.float32) y_test = np.fromfile(MODEL_PARAMS_DIR + '/alexnet2_cifar10/test_labels.bin', dtype=np.uint32) diff --git a/hpvm/projects/keras/src/mobilenet_cifar10.py b/hpvm/projects/keras/src/mobilenet_cifar10.py index c1ea50c109d33ddcf6f7f3336047f765f283dc99..2406e13435895b6b87b4d8565e2586172f562dbf 100644 --- a/hpvm/projects/keras/src/mobilenet_cifar10.py +++ b/hpvm/projects/keras/src/mobilenet_cifar10.py @@ -105,12 +105,12 @@ class MobileNet_CIFAR10(Benchmark): (X_train, y_train), (X_val, y_val) = cifar10.load_data() X_train = X_train / 255.0 - X_val = X_val / 255.0 + #X_val = X_val / 255.0 mean = np.mean(X_train) std = np.std(X_train) X_train = (X_train - mean) / (std + 1e-7) - X_val = (X_val - mean) / (std + 1e-7) + #X_val = (X_val - mean) / (std + 1e-7) X_test = np.fromfile(MODEL_PARAMS_DIR + '/mobilenet_cifar10/test_input.bin', dtype=np.float32) y_test= np.fromfile(MODEL_PARAMS_DIR + '/mobilenet_cifar10/test_labels.bin', dtype=np.uint32) @@ -120,7 +120,7 @@ class MobileNet_CIFAR10(Benchmark): X_tuner = np.fromfile(MODEL_PARAMS_DIR + '/mobilenet_cifar10/tune_input.bin', dtype=np.float32) y_tuner = np.fromfile(MODEL_PARAMS_DIR + '/mobilenet_cifar10/tune_labels.bin', dtype=np.uint32) - X_tuner = X_tune.reshape((-1,3,32,32)) + X_tuner = X_tuner.reshape((-1,3,32,32)) return X_train, y_train, X_test, y_test, X_tuner, y_tuner diff --git a/hpvm/projects/keras/src/resnet18_cifar10.py b/hpvm/projects/keras/src/resnet18_cifar10.py index 266f00dfa9616b8626063e6b4a899a9e47a02a87..6f94a151e8b23912963df4c22ddab3940ae024af 100644 --- a/hpvm/projects/keras/src/resnet18_cifar10.py +++ b/hpvm/projects/keras/src/resnet18_cifar10.py @@ -438,15 +438,9 @@ class ResNet18_CIFAR10(Benchmark): (X_train, y_train), (X_val, y_val) = cifar10.load_data() X_train = X_train / 255.0 - X_val = X_val / 255.0 - mean = np.mean(X_train) std = np.std(X_train) -# X_train = (X_train - mean) / (std + 1e-7) -# X_val = (X_val - mean) / (std + 1e-7) X_train = (X_train - mean) - X_val = (X_val - mean) - X_test = np.fromfile(MODEL_PARAMS_DIR + '/resnet18_cifar10/test_input.bin', dtype=np.float32) y_test = np.fromfile(MODEL_PARAMS_DIR + '/resnet18_cifar10/test_labels.bin', dtype=np.uint32) diff --git a/hpvm/projects/keras/src/vgg16_cifar10.py b/hpvm/projects/keras/src/vgg16_cifar10.py index 3870aa6dc9d9274352edd5ef500f42a025347186..9677fc2650b84ecc723865c3534d6d648eb70c1a 100644 --- a/hpvm/projects/keras/src/vgg16_cifar10.py +++ b/hpvm/projects/keras/src/vgg16_cifar10.py @@ -103,12 +103,12 @@ class VGG16_CIFAR10(Benchmark): (X_train, y_train), (X_val, y_val) = cifar10.load_data() X_train = X_train / 255.0 - X_val = X_val / 255.0 + #X_val = X_val / 255.0 mean = np.mean(X_train) std = np.std(X_train) X_train = (X_train - mean) / (std + 1e-7) - X_val = (X_val - mean) / (std + 1e-7) + #X_val = (X_val - mean) / (std + 1e-7) X_test= np.fromfile(MODEL_PARAMS_DIR + '/vgg16_cifar10/test_input.bin', dtype=np.float32) y_test = np.fromfile(MODEL_PARAMS_DIR + '/vgg16_cifar10/test_labels.bin', dtype=np.uint32) diff --git a/hpvm/projects/keras/src/vgg16_cifar100.py b/hpvm/projects/keras/src/vgg16_cifar100.py index d605e05bd9258b0dd27b8b6d1aa721329ece1a35..5d683929345ec5dac448d943c5d959c24736c171 100644 --- a/hpvm/projects/keras/src/vgg16_cifar100.py +++ b/hpvm/projects/keras/src/vgg16_cifar100.py @@ -119,20 +119,20 @@ class VGG16_CIFAR100(Benchmark): (X_train, y_train), (X_val, y_val) = cifar100.load_data() X_train = X_train / 255.0 - X_val = X_val / 255.0 + #X_val = X_val / 255.0 mean = np.mean(X_train) std = np.std(X_train) X_train = (X_train - mean) / (std + 1e-7) - X_val = (X_val - mean) / (std + 1e-7) + #X_val = (X_val - mean) / (std + 1e-7) X_test = np.fromfile(MODEL_PARAMS_DIR + '/vgg16_cifar100/test_input.bin', dtype=np.float32) y_test = np.fromfile(MODEL_PARAMS_DIR + '/vgg16_cifar100/test_labels.bin', dtype=np.uint32) X_test = X_test.reshape((-1,3,32,32)) - X_tuner = np.fromfile(MODEL_PARAMS_DIR + '/vgg16_cifar100/tuner_input.bin', dtype=np.float32) - y_tuner = np.fromfile(MODEL_PARAMS_DIR + '/vgg16_cifar100/tuner_labels.bin', dtype=np.uint32) + X_tuner = np.fromfile(MODEL_PARAMS_DIR + '/vgg16_cifar100/tune_input.bin', dtype=np.float32) + y_tuner = np.fromfile(MODEL_PARAMS_DIR + '/vgg16_cifar100/tune_labels.bin', dtype=np.uint32) X_tuner = X_tuner.reshape((-1,3,32,32))