Move epsilon

This commit is contained in:
Paul O'Leary McCann 2022-05-24 15:59:08 +09:00
parent 9da16df96e
commit b1118cee58
2 changed files with 1 additions and 2 deletions

View File

@ -185,6 +185,7 @@ class CorefScorer(torch.nn.Module):
return coref_scores, top_indices return coref_scores, top_indices
EPSILON = 1e-7
# Note this function is kept here to keep a torch dep out of coref_util. # Note this function is kept here to keep a torch dep out of coref_util.
def add_dummy(tensor: torch.Tensor, eps: bool = False): def add_dummy(tensor: torch.Tensor, eps: bool = False):
"""Prepends zeros (or a very small value if eps is True) """Prepends zeros (or a very small value if eps is True)

View File

@ -8,8 +8,6 @@ MentionClusters = List[List[Tuple[int, int]]]
DEFAULT_CLUSTER_PREFIX = "coref_clusters" DEFAULT_CLUSTER_PREFIX = "coref_clusters"
EPSILON = 1e-7
class GraphNode: class GraphNode:
def __init__(self, node_id: int): def __init__(self, node_id: int):
self.id = node_id self.id = node_id