31bfc7c1ce9dac771dbd5e2edf2d5e789d8b1aaa,evaluate.py,,from_pipe,#Any#,18
Before Change
read_input = True
while read_input:
for i in range(0, opts.batch_size):
raw_image = pipe_in.stdout.read(width * height * 3)
if len(raw_image) != nbytes:
read_input = False
break
image = numpy.fromstring(raw_image, dtype="uint8")
image = image.reshape((height, width, 3))
X[i] = image
if read_input:
_preds = sess.run(preds, feed_dict={img_placeholder: X})
for i in range(0, opts.batch_size):
After Change
while read_input:
count = 0
while count < opts.batch_size:
raw_image = pipe_in.stdout.read(width * height * 3)
if len(raw_image) != nbytes:
last = True
X = X[:count]
batch_shape = (count, height, width, 3)
img_placeholder = tf.placeholder(tf.float32, shape=batch_shape,
name="img_placeholder")
preds = transform.net(img_placeholder)
break
image = numpy.fromstring(raw_image, dtype="uint8")
image = image.reshape((height, width, 3))
X[count] = image
count += 1
if read_input:
if last:
read_input = False
_preds = sess.run(preds, feed_dict={img_placeholder: X})
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: lengstrom/fast-style-transfer
Commit Name: 31bfc7c1ce9dac771dbd5e2edf2d5e789d8b1aaa
Time: 2016-12-23
Author: jonathan.e.m.bocker@gmail.com
File Name: evaluate.py
Class Name:
Method Name: from_pipe
Project Name: scikit-image/scikit-image
Commit Name: e6a2d913abacd29ea5eba80746ef7774b370168f
Time: 2017-11-12
Author: sjvdwalt@gmail.com
File Name: skimage/morphology/_skeletonize.py
Class Name:
Method Name: thin
Project Name: TheAlgorithms/Python
Commit Name: e58a5e68424df74a4c7b30df04162c775044405c
Time: 2019-07-30
Author: 44649323+FrogBattle@users.noreply.github.com
File Name: sorts/tim_sort.py
Class Name:
Method Name: tim_sort