531bcb75ee8295b7229dc4244570bfca40af84ef,src/train.py,,get_symbol,#Any#Any#Any#,182

Before Change


      body = body - args.margin_b
    new_zy = body*s
    if args.margin_verbose>0:
      margin_symbols.append(mx.symbol.mean(t))
    diff = new_zy - zy
    diff = mx.sym.expand_dims(diff, 1)
    gt_one_hot = mx.sym.one_hot(gt_label, depth = args.num_classes, on_value = 1.0, off_value = 0.0)
    body = mx.sym.broadcast_mul(gt_one_hot, diff)

After Change


    if args.margin_a!=1.0 or args.margin_m!=0.0 or args.margin_b!=0.0:
      if args.margin_a==1.0 and args.margin_m==0.0:
        s_m = s*args.margin_b
        gt_one_hot = mx.sym.one_hot(gt_label, depth = args.num_classes, on_value = s_m, off_value = 0.0)
        fc7 = fc7-gt_one_hot
      else:
        zy = mx.sym.pick(fc7, gt_label, axis=1)
        cos_t = zy/s
        t = mx.sym.arccos(cos_t)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: deepinsight/insightface
Commit Name: 531bcb75ee8295b7229dc4244570bfca40af84ef
Time: 2018-08-17
Author: guojia@gmail.com
File Name: src/train.py
Class Name:
Method Name: get_symbol


Project Name: reinforceio/tensorforce
Commit Name: d75d3002186f4bac61966dece60a908cd85a5e7c
Time: 2016-11-14
Author: mi.schaarschmidt@gmail.com
File Name: tensorforce/value_functions/deep_q_network.py
Class Name: DeepQNetwork
Method Name: create_training_operations


Project Name: deepinsight/insightface
Commit Name: ec9aa4d6de1017374665cfc69b35bcda012bc7b7
Time: 2018-08-17
Author: guojia@gmail.com
File Name: src/train.py
Class Name:
Method Name: get_symbol