41ef0bf4ece3daf13a02b14c79eb7ddebb42bc0c,facegen/generate.py,,generate_from_yaml,#,418
Before Change
gen = model.predict(inputs, batch_size=batch_size)
print("Writing to "{}"...".format(output_dir))
for i in range(0, gen.shape[0]):
if K.image_dim_ordering() == "th":
image = np.empty(gen.shape[2:]+(3,))
After Change
num_images = inputs["identity"].shape[0]
count = 0
for idx in tqdm(range(0, num_images, batch_size)):
batch = {
"identity": inputs["identity"] [idx:idx+batch_size,:],
"emotion": inputs["emotion"] [idx:idx+batch_size,:],
"orientation": inputs["orientation"][idx:idx+batch_size,:],
}
gen = model.predict_on_batch(batch)
for i in range(0, gen.shape[0]):
if K.image_dim_ordering() == "th":
image = np.empty(gen.shape[2:]+(3,))
for x in range(0, 3):
image[:,:,x] = gen[i,x,:,:]
else:
image = gen[i,:,:,:]
image = np.array(255*np.clip(image,0,1), dtype=np.uint8)
file_path = os.path.join(output_dir, "{:05}.png".format(count))
scipy.misc.imsave(file_path, image)
count += 1
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 5
Instances Project Name: zo7/deconvfaces
Commit Name: 41ef0bf4ece3daf13a02b14c79eb7ddebb42bc0c
Time: 2016-09-04
Author: zo7.flynn@gmail.com
File Name: facegen/generate.py
Class Name:
Method Name: generate_from_yaml
Project Name: freelunchtheorem/Conditional_Density_Estimation
Commit Name: c11520dbcc6c1c3889bc76a2b76f6adf5e99c54d
Time: 2019-05-02
Author: simonboehm@mailbox.org
File Name: cde/density_estimator/BaseNNEstimator.py
Class Name: BaseNNEstimator
Method Name: fit_by_cv
Project Name: EpistasisLab/scikit-rebate
Commit Name: ece383696800b9b34854df27a65a3d1d74669952
Time: 2020-05-28
Author: alexmxu@alexs-mbp-3.attlocal.net
File Name: skrebate/iterrelief.py
Class Name: IterRelief
Method Name: fit
Project Name: erikwijmans/Pointnet2_PyTorch
Commit Name: 803d7e1fc61536c846c811bdee158bd21db36779
Time: 2017-12-26
Author: ewijmans2@gmail.com
File Name: models/Pointnet2Cls.py
Class Name:
Method Name:
Project Name: EpistasisLab/scikit-rebate
Commit Name: 163eb7df13667e21b0e02a2706e18d1f53eee610
Time: 2020-01-29
Author: alexmxu99@gmail.com
File Name: skrebate/iterrelief.py
Class Name: IterRelief
Method Name: fit