

def get_cost(self, inputs, targets):
    '\n        Compute the cost function over a list of inputs and targets.\n\n        Arguments:\n            inputs (list(Tensor)): list of Tensors containing input values to be compared to\n                                   targets\n            targets (Tensor, list(Tensor)): either a list of Tensors containing target values, or\n                                            a single target Tensor that will be mapped to each\n                                            input\n\n        Returns:\n            Tensor containing cost\n        '
    if (not isinstance(inputs, list)):
        return self.costs[0].get_cost(inputs, targets)
    else:
        ltargets = (targets if (type(targets) in (tuple, list)) else [targets for c in self.costs])
        costvals = [t.get_cost(i, t) for (c, i, t) in zip(self.costs, inputs, ltargets)]
        sum_optree = reduce(add, [(w * c) for (w, c) in zip(self.weights, costvals)])
        costvals[0][:] = sum_optree
        return costvals[0]

dataset/ETHPy150Open NervanaSystems/neon/neon/layers/container.py Multicost.get_cost/VarMisuse@81/242 `c`->`t`