class_docstr: A Loss that adds up a weighted sum of other losses.
class_docstr_tok: ["A","Loss","that","adds","up","a","weighted","sum","of","other","losses","."]
code: def __init__(self, model, terms):
      self.terms = terms
  
      Loss.__init__(self, model, locals())
  
imports: import copy
  import json
  import os
  import warnings
  import numpy
  import tensorflow
  from cleverhans.attacks import Attack
  from cleverhans.compat import softmax_cross_entropy_with_logits
  from cleverhans.model import Model
  from cleverhans.utils import safe_zip
label_desc: Use image node_id 1 to create a new WeightedSum object from inherited base classes: Loss with example: obj = WeightedSum(model, terms)