0872850aaaffdcbf102255b3ed20c67264d51a9c,examples/pretrained_cnn/tutorial_models_vgg16.py,,,#,12

Before Change


img1 = tl.prepro.imresize(img1, (224, 224))
img1 = img1.astype(np.float32)
// rescale pixels values in the range of 0-1
img1 = img1 / 255.0
if ((0 <= img1).all() and (img1 <= 1.0).all()) is False:
    raise Exception("image value should be [0, 1]")

start_time = time.time()
vgg.eval()
output = vgg(img1)
probs = tf.nn.softmax(output)[0].numpy()

After Change


img1 = tl.vis.read_image("data/tiger.jpeg")
img1 = tl.prepro.imresize(img1, (224, 224))
img1 = img1.astype(np.float32)
mean = np.array([123.68, 116.779, 103.939], dtype=np.float32).reshape([1, 1, 1, 3])
img1 = img1 - mean

start_time = time.time()
vgg.eval()
output = vgg(img1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 17

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: 0872850aaaffdcbf102255b3ed20c67264d51a9c
Time: 2019-03-07
Author: 37874862+warshallrho@users.noreply.github.com
File Name: examples/pretrained_cnn/tutorial_models_vgg16.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: 0872850aaaffdcbf102255b3ed20c67264d51a9c
Time: 2019-03-07
Author: 37874862+warshallrho@users.noreply.github.com
File Name: examples/pretrained_cnn/tutorial_models_vgg.py
Class Name:
Method Name:


Project Name: tensorlayer/tensorlayer
Commit Name: 0872850aaaffdcbf102255b3ed20c67264d51a9c
Time: 2019-03-07
Author: 37874862+warshallrho@users.noreply.github.com
File Name: examples/pretrained_cnn/tutorial_models_vgg19.py
Class Name:
Method Name: