mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Move epsilon
This commit is contained in:
		
							parent
							
								
									9da16df96e
								
							
						
					
					
						commit
						b1118cee58
					
				| 
						 | 
					@ -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)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user