could someone please confirm if this change  (## refers to old code)
    # measure accuracy and record loss
    ##losses.update(loss_triplet.data[0], num_items)
    ##accs.update(acc.data[0], num_items)
    ##emb_norms.update(loss_embed.data[0])
    ##mask_norms.update(loss_mask.data[0])
    
    losses.update(loss_triplet.data, num_items)
    accs.update(acc.data, num_items)
    emb_norms.update(loss_embed.data)
    mask_norms.update(loss_mask.data)

based on this suggestion invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number · Issue #113 · NVIDIA/flownet2-pytorch · GitHub makes any sense if the error i was getting is non-existent?
Error was:

invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number