ec43bfe71f25287c3987d88255f4adaf22030651,hypergan/train_hooks/imle_train_hook.py,IMLETrainHook,before_step,#IMLETrainHook#Any#Any#,71
Before Change
self.gan.session.run([self.assign_x[_j], self.assign_encoded_latent[_j]])
else:
for j in range(new_entries):
scores = []
_j = (j+self.offset) % self.memory_size
self.gan.session.run(self.assign_x[_j])
for i in range(self.search_size):
s,_ = self.gan.session.run([self.l2_loss_on_g[_j], self.assign_latent[i]])
scores.append(s)
sort = zip(scores, self.assign_latent_to_max[_j])
sort2 = sorted(sort, key=itemgetter(0))
print(" Max ", sort2[-1][0])
print(" Min ", sort2[0][0])
self.gan.session.run(sort2[0][-1])
self.offset += new_entries
After Change
min_score = None
for i in range(self.search_size):
s,_ = self.gan.session.run([self.l2_loss_on_g[_j], self.assign_latent])
if( min_score == None or min_score > s):
self.gan.session.run(self.assign_latent_to_min[_j])
min_score = s
else:
pass
//print("Ignoring score", s)
print(" Min ", min_score)
self.offset += new_entries
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: HyperGAN/HyperGAN
Commit Name: ec43bfe71f25287c3987d88255f4adaf22030651
Time: 2019-01-10
Author: mikkel@255bits.com
File Name: hypergan/train_hooks/imle_train_hook.py
Class Name: IMLETrainHook
Method Name: before_step
Project Name: codelucas/newspaper
Commit Name: 5d6cdbd53544d057a1cf344526ec70e0995b77d1
Time: 2014-12-17
Author: lucasyangpersonal@gmail.com
File Name: newspaper/nlp.py
Class Name:
Method Name: keywords
Project Name: probcomp/bayeslite
Commit Name: 93a71bd6c3f3c731473bc0ddd9b894a252738d01
Time: 2019-12-06
Author: jar23@mumble.net
File Name: src/backends/cgpm_backend.py
Class Name: CGPM_Backend
Method Name: json_ready_models