mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-30 23:47:31 +03:00 
			
		
		
		
	Update thinc imports for 6.9
This commit is contained in:
		
							parent
							
								
									4a59f6358c
								
							
						
					
					
						commit
						5454b20cd7
					
				
							
								
								
									
										31
									
								
								spacy/_ml.py
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								spacy/_ml.py
									
									
									
									
									
								
							|  | @ -1,33 +1,28 @@ | |||
| import ujson | ||||
| from thinc.v2v import Model, Maxout, Softmax, Affine, ReLu, SELU | ||||
| from thinc.i2v import HashEmbed, StaticVectors | ||||
| from thinc.t2t import ExtractWindow, ParametricAttention | ||||
| from thinc.t2v import Pooling, max_pool, mean_pool, sum_pool | ||||
| from thinc.misc import Residual | ||||
| from thinc.misc import BatchNorm as BN | ||||
| from thinc.misc import LayerNorm as LN | ||||
| 
 | ||||
| from thinc.api import add, layerize, chain, clone, concatenate, with_flatten | ||||
| from thinc.neural._classes.model import Model | ||||
| from thinc.neural._classes.maxout import Maxout | ||||
| from thinc.neural._classes.softmax import Softmax | ||||
| from thinc.neural._classes.affine import Affine | ||||
| from thinc.neural._classes.hash_embed import HashEmbed | ||||
| from thinc.api import FeatureExtracter, with_getitem | ||||
| from thinc.api import uniqued, wrap, flatten_add_lengths, noop | ||||
| 
 | ||||
| from thinc.linear.linear import LinearModel | ||||
| from thinc.neural.ops import NumpyOps, CupyOps | ||||
| from thinc.neural.util import get_array_module | ||||
| 
 | ||||
| import random | ||||
| import cytoolz | ||||
| 
 | ||||
| from thinc.neural._classes.convolution import ExtractWindow | ||||
| from thinc.neural._classes.static_vectors import StaticVectors | ||||
| from thinc.neural._classes.batchnorm import BatchNorm as BN | ||||
| from thinc.neural._classes.layernorm import LayerNorm as LN | ||||
| from thinc.neural._classes.resnet import Residual | ||||
| from thinc.neural._classes.relu import ReLu | ||||
| from thinc.neural._classes.selu import SELU | ||||
| from thinc import describe | ||||
| from thinc.describe import Dimension, Synapses, Biases, Gradient | ||||
| from thinc.neural._classes.affine import _set_dimensions_if_needed | ||||
| from thinc.api import FeatureExtracter, with_getitem | ||||
| from thinc.neural.pooling import Pooling, max_pool, mean_pool, sum_pool | ||||
| from thinc.neural._classes.attention import ParametricAttention | ||||
| from thinc.linear.linear import LinearModel | ||||
| from thinc.api import uniqued, wrap, flatten_add_lengths, noop | ||||
| import thinc.extra.load_nlp | ||||
| 
 | ||||
| 
 | ||||
| from .attrs import ID, ORTH, LOWER, NORM, PREFIX, SUFFIX, SHAPE, TAG, DEP, CLUSTER | ||||
| from .tokens.doc import Doc | ||||
| from . import util | ||||
|  |  | |||
|  | @ -13,20 +13,18 @@ import ujson | |||
| import msgpack | ||||
| 
 | ||||
| from thinc.api import add, layerize, chain, clone, concatenate, with_flatten | ||||
| from thinc.neural._classes.model import Model | ||||
| from thinc.neural._classes.maxout import Maxout | ||||
| from thinc.neural._classes.softmax import Softmax | ||||
| from thinc.neural._classes.affine import Affine | ||||
| from thinc.neural._classes.hash_embed import HashEmbed | ||||
| from thinc.v2v import Model, Maxout, Softmax, Affine, ReLu, SELU | ||||
| from thinc.i2v import HashEmbed | ||||
| from thinc.t2v import Pooling, max_pool, mean_pool, sum_pool | ||||
| from thinc.t2t import ExtractWindow, ParametricAttention | ||||
| from thinc.misc import Residual | ||||
| from thinc.misc import BatchNorm as BN | ||||
| from thinc.misc import LayerNorm as LN | ||||
| 
 | ||||
| from thinc.neural.util import to_categorical | ||||
| 
 | ||||
| from thinc.neural.pooling import Pooling, max_pool, mean_pool | ||||
| from thinc.neural._classes.difference import Siamese, CauchySimilarity | ||||
| 
 | ||||
| from thinc.neural._classes.convolution import ExtractWindow | ||||
| from thinc.neural._classes.resnet import Residual | ||||
| from thinc.neural._classes.batchnorm import BatchNorm as BN | ||||
| 
 | ||||
| from .tokens.doc cimport Doc | ||||
| from .syntax.parser cimport Parser as LinearParser | ||||
| from .syntax.nn_parser cimport Parser as NeuralParser | ||||
|  |  | |||
|  | @ -38,13 +38,9 @@ from preshed.maps cimport MapStruct | |||
| from preshed.maps cimport map_get | ||||
| 
 | ||||
| from thinc.api import layerize, chain, noop, clone, with_flatten | ||||
| from thinc.neural._classes.model import Model | ||||
| from thinc.neural._classes.affine import Affine | ||||
| from thinc.neural._classes.relu import ReLu | ||||
| from thinc.neural._classes.maxout import Maxout | ||||
| from thinc.neural._classes.batchnorm import BatchNorm as BN | ||||
| from thinc.neural._classes.selu import SELU | ||||
| from thinc.neural._classes.layernorm import LayerNorm | ||||
| from thinc.v2v import Model, Maxout, Softmax, Affine, ReLu, SELU | ||||
| from thinc.misc import LayerNorm | ||||
| 
 | ||||
| from thinc.neural.ops import NumpyOps, CupyOps | ||||
| from thinc.neural.util import get_array_module | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user