31bfc7c1ce9dac771dbd5e2edf2d5e789d8b1aaa,evaluate.py,,from_pipe,#,18
Before Change
error = (str(err) + ("\n\nMoviePy error: FFMPEG encountered "
"the following error while writing file:"
"\n\n %s" % ffmpeg_error))
pipe_out.stdin.close()
pipe_in.stdout.close()
pipe_out.terminate()
pipe_in.terminate()
del pipe_in
After Change
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})
for i in range(0, batch_shape[0]):
img = np.clip(_preds[i], 0, 255).astype(np.uint8)
try:
pipe_out.stdin.write(img)

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: THUNLP-MT/THUMT
Commit Name: 6880ee0c2c46573cfc77444e2970aa8695140076
Time: 2019-02-14
Author: playinf@stu.xmu.edu.cn
File Name: thumt/scripts/shuffle_corpus.py
Class Name:
Method Name: main
Project Name: richzhang/colorization-pytorch
Commit Name: 1215d2390c0ef900337366e7a89e8d21e4bfd592
Time: 2018-08-25
Author: rzhang88@gmail.com
File Name: test_sweep.py
Class Name:
Method Name: