Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	Commit 
							
							·
						
						bd9c39d
	
1
								Parent(s):
							
							3d1c8c2
								
Upload batched_main_NER.py
Browse files- batched_main_NER.py +6 -1
    	
        batched_main_NER.py
    CHANGED
    
    | @@ -26,7 +26,12 @@ SPECIFIC_TAG=":__entity__" | |
| 26 |  | 
| 27 | 
             
            def softmax(x):
         | 
| 28 | 
             
                """Compute softmax values for each sets of scores in x."""
         | 
| 29 | 
            -
                 | 
|  | |
|  | |
|  | |
|  | |
|  | |
| 30 |  | 
| 31 |  | 
| 32 | 
             
            #noun_tags = ['NFP','JJ','NN','FW','NNS','NNPS','JJS','JJR','NNP','POS','CD']
         | 
|  | |
| 26 |  | 
| 27 | 
             
            def softmax(x):
         | 
| 28 | 
             
                """Compute softmax values for each sets of scores in x."""
         | 
| 29 | 
            +
                e_x = np.exp(x - np.max(x))
         | 
| 30 | 
            +
                return e_x / e_x.sum(axis=0) # only difference
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            #def softmax(x):
         | 
| 33 | 
            +
            #    """Compute softmax values for each sets of scores in x."""
         | 
| 34 | 
            +
            #    return np.exp(x) / np.sum(np.exp(x), axis=0)
         | 
| 35 |  | 
| 36 |  | 
| 37 | 
             
            #noun_tags = ['NFP','JJ','NN','FW','NNS','NNPS','JJS','JJR','NNP','POS','CD']
         | 
