boundlab.polysp.softmax.restrict_errors#

boundlab.polysp.softmax.restrict_errors(poly, hw)[source]#

Return updated generator with old_error = hw * new_error range.

Parameters:
  • poly (Generator) – Generator to restrict.

  • hw (Tensor) – torch.Tensor of shape (poly.error_len,) representing the coefficient of the new error.