13ed139f539684bf39919963241bf37ab2967d77,examples/pretrained_cnn/tutorial_models_mobilenetv1.py,,,#,18

Before Change


import tensorlayer as tl
from tensorlayer.models.imagenet_classes import class_names

tf.logging.set_verbosity(tf.logging.DEBUG)
tl.logging.set_verbosity(tl.logging.DEBUG)

x = tf.placeholder(tf.float32, [None, 224, 224, 3])

// get the whole model
mobilenetv1 = tl.models.MobileNetV1(x)

After Change



img1 = tl.vis.read_image("data/tiger.jpeg")
img1 = tl.prepro.imresize(img1, (224, 224)) / 255
img1 = img1.astype(np.float32)[np.newaxis, ...]

start_time = time.time()
output = mobilenetv1(img1, is_train=False)
prob = tf.nn.softmax(output)[0].numpy()
print("  End time : %.5ss" % (time.time() - start_time))
preds = (np.argsort(prob)[::-1])[0:5]
for p in preds:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: 13ed139f539684bf39919963241bf37ab2967d77
Time: 2019-04-23
Author: rundi_wu@pku.edu.cn
File Name: examples/pretrained_cnn/tutorial_models_mobilenetv1.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: 301f593e6d80712315ec965996cdccb9a20b54c0
Time: 2019-04-24
Author: rundi_wu@pku.edu.cn
File Name: examples/pretrained_cnn/tutorial_models_squeezenetv1.py
Class Name:
Method Name:


Project Name: CyberReboot/NetworkML
Commit Name: e2226f604c7f6444630be324d06a8130a01f3366
Time: 2018-01-22
Author: CStephenson970@gmail.com
File Name: NodeClassifier/utils/rnnclassifier.py
Class Name: AbnormalDetector
Method Name: __init__


Project Name: tensorlayer/tensorlayer
Commit Name: 13ed139f539684bf39919963241bf37ab2967d77
Time: 2019-04-23
Author: rundi_wu@pku.edu.cn
File Name: examples/pretrained_cnn/tutorial_models_mobilenetv1.py
Class Name:
Method Name: