Skip to content

Commit f5ea7f7

Browse files
committed
update relative path
1 parent 3c229c8 commit f5ea7f7

10 files changed

+10
-10
lines changed

demo/cifar10_tensorflow_classifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def main():
88

9-
current_dir = os.path.join(os.path.dirname(__file__))
9+
current_dir = os.path.dirname(__file__)
1010
(Xtrain, Ytrain), (Xtest, Ytest) = cifar10.load_data()
1111

1212
Xtest = Xtest.astype('float32') / 255

demo/cifar10_tensorflow_export_pb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def main():
66
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
77
from keras_image_classifier.library.cifar10_classifier import Cifar10Classifier
88

9-
current_dir = os.path.join(os.path.dirname(__file__))
9+
current_dir = os.path.dirname(__file__)
1010

1111
classifier = Cifar10Classifier()
1212
classifier.load_model(os.path.join(current_dir, 'models'))

demo/cnn_bi_classifier_explore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from keras.preprocessing.image import load_img, img_to_array
22
import os
33

4-
current_dir = os.path.join(os.path.dirname(__file__))
4+
current_dir = os.path.dirname(__file__)
55
img = load_img(current_dir + '/bi_classifier_data/training/cat/cat.0.jpg')
66
x = img_to_array(img)
77
print(x.shape)

demo/cnn_bi_classifier_predict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55
import os
66

7-
current_dir = os.path.join(os.path.dirname(__file__))
7+
current_dir = os.path.dirname(__file__)
88

99
json = open(current_dir + '/models/cnn_bi_classifier_architecture.json', 'r').read()
1010

demo/cnn_bi_classifier_resize_img.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33
from os import path
44

5-
current_dir = os.path.join(os.path.dirname(__file__))
5+
current_dir = os.path.dirname(__file__)
66

77
train_data_dir = current_dir + '/bi_classifier_data/training'
88
validation_data_dir = current_dir + '/bi_classifier_data/validation'

demo/cnn_bi_classifier_train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
def main():
99
img_width, img_height = 150, 150
1010

11-
current_dir = os.path.join(os.path.dirname(__file__))
11+
current_dir = os.path.dirname(__file__)
1212

1313
train_data_dir = current_dir + '/bi_classifier_data/training'
1414
validation_data_dir = current_dir + '/bi_classifier_data/validation'

demo/cnn_cifar10_predict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from keras.utils import np_utils
77

88
# load and configure the cifar19 classifier model
9-
current_dir = os.path.join(os.path.dirname(__file__))
9+
current_dir = os.path.dirname(__file__)
1010

1111
cifar10_model = model_from_json(
1212
open(os.path.join(current_dir, 'models', 'cnn_cifar10_architecture.json')).read())

demo/cnn_cifar10_train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def main():
1212
batch_size = 128
1313
epochs = 20
1414
nb_classes = 10
15-
current_dir = os.path.join(os.path.dirname(__file__))
15+
current_dir = os.path.dirname(__file__)
1616

1717
output_dir_path = os.path.join(current_dir, 'models')
1818

demo/cnn_vgg16_predict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def predict(filename):
1919
print(output)
2020

2121

22-
current_dir = os.path.join(os.path.dirname(__file__))
22+
current_dir = os.path.dirname(__file__)
2323

2424
for i in range(100):
2525
predict(current_dir + '/bi_classifier_data/training/cat/cat.' + str(i) + '.jpg')

demo/cnn_vgg19_predict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ def predict(filename):
2121

2222

2323
for i in range(100):
24-
current_dir = os.path.join(os.path.dirname(__file__))
24+
current_dir = os.path.dirname(__file__)
2525
predict(current_dir + '/bi_classifier_data/training/cat/cat.' + str(i) + '.jpg')
2626
predict(current_dir + '/bi_classifier_data/training/dog/dog.' + str(i) + '.jpg')

0 commit comments

Comments
 (0)