d98df66f581dca38bbe7dfc299386921b65bda0d,solutionbox/code_free_ml/mltoolbox/code_free_ml/trainer/task.py,,make_prediction_output_tensors,#Any#Any#Any#Any#Any#,364
Before Change
// if top_n == 0, this means use all the classes.
if args.top_n == 0:
top_n = probabilities.shape[1].value
else:
top_n = args.top_n
After Change
// probabilities labels.
if args.top_n == 0:
predicted_index = tf.argmax(probabilities, axis=1)
predicted = table.lookup(predicted_index)
outputs.update({PG_CLASSIFICATION_FIRST_LABEL: predicted})
probabilities_list = tf.unstack(probabilities, axis=1)
for class_name, p in zip(class_names, probabilities_list):
outputs[class_name] = p
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: googledatalab/pydatalab
Commit Name: d98df66f581dca38bbe7dfc299386921b65bda0d
Time: 2017-09-28
Author: qimingj@users.noreply.github.com
File Name: solutionbox/code_free_ml/mltoolbox/code_free_ml/trainer/task.py
Class Name:
Method Name: make_prediction_output_tensors
Project Name: HyperGAN/HyperGAN
Commit Name: 4608f590d88eeaf1661e3911a7ee943f75269321
Time: 2017-06-07
Author: martyn@255bits.com
File Name: hypergan/losses/category_loss.py
Class Name: CategoryLoss
Method Name: _create
Project Name: HyperGAN/HyperGAN
Commit Name: 8a3148f6f973652500853e656274e65070edaf7e
Time: 2017-06-03
Author: martyn@255bits.com
File Name: hypergan/losses/least_squares_loss.py
Class Name: LeastSquaresLoss
Method Name: create