o
    i                     @   s  d dl mZmZmZmZmZmZmZmZm	Z	m
Z
mZ d dlmZmZmZ d dlmZmZmZ d dlmZmZmZmZmZ d dlmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZemfZfmgZgmhZhmiZimjZjmkZk d dllmmZmmnZnmoZompZp d dlqmrZrmsZsmtZtmuZumvZvmwZw d dlxmyZymzZzm{Z{m|Z| d d	l}m~Z~mZmZmZmZmZmZ d d
lmZmZmZmZmZmZmZmZ d dlmZmZmZmZ d dlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ g dZdS )   )CupyOpsMPSOpsNumpyOpsOpsget_current_opsget_opsset_current_opsset_gpu_allocatoruse_opsuse_pytorch_for_gpu_memoryuse_tensorflow_for_gpu_memory)enable_mxnetenable_tensorflowhas_cupy)ConfigConfigValidationErrorregistry)configure_normal_initglorot_uniform_initnormal_inituniform_init	zero_init)QLSTMCauchySimilarityClippedLinearDishDropoutEmbedGeluHardSigmoid	HardSwishHardSwishMobilenetHardTanh	HashEmbed	LayerNormLinearLogisticMaxoutMishMultiSoftmaxMXNetWrapperParametricAttentionParametricAttention_v2PyTorchLSTMPyTorchRNNWrapperPyTorchWrapperPyTorchWrapper_v2PyTorchWrapper_v3ReluReluKSigmoidSoftmax
Softmax_v2SparseLinearSparseLinear_v2SwishTensorFlowWrapperTorchScriptWrapper_v1addarray_getitembidirectionalchaincloneconcatenateexpand_windowkeras_subclass
list2arraylist2paddedlist2raggedmap_listnooppadded2list
premap_idspytorch_to_torchscript_wrapperragged2listreduce_firstreduce_last
reduce_maxreduce_mean
reduce_sum	remap_idsremap_ids_v2residual	resizablesiamesesigmoid_activationsoftmax_activationstrings2arraystuplifyuniqued
with_arraywith_array2dwith_cpu
with_debugwith_flattenwith_flatten_v2with_getitem	with_listwith_nvtx_rangewith_paddedwith_raggedwith_reshapewith_signpost_interval)CategoricalCrossentropyCosineDistance
L2DistanceSequenceCategoricalCrossentropy)Modelchange_attr_valuesdeserialize_attrserialize_attrset_dropout_ratewrap_model_recursive)SGDAdam	OptimizerRAdam)compoundingconstantconstant_thencyclic_triangulardecayingslanted_triangularwarmup_linear)	MXNetShimPyTorchGradScalerPyTorchShimShimTensorFlowShimTorchScriptShimkeras_model_fnsmaybe_handshake_model)
ArgsKwargsPaddedRaggedUnserializable)DataValidationErrordata_validationfix_random_seedget_array_moduleget_torch_default_device	get_widthis_cupy_arraymxnet2xp
prefer_gpurequire_cpurequire_gpuset_active_gputensorflow2xpto_categoricalto_numpytorch2xpxp2mxnetxp2tensorflowxp2torch)r   r   r   r   r   r   r   r   ri   rk   rj   rl   rm   rp   ro   rq   rn   rr   r   r   r   r   r   r~   r   r   rt   rv   rs   ru   rz   r}   rx   ry   r{   r|   rw   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
   r   r   r   r   r	   r   r   r   r   rB   r#   r$   r%   r'   r(   r)   r2   rX   r5   r   r   r+   r&   rU   rW   r4   r7   r   r3   r"   r   r   r    r!   r9   r   r/   r.   r-   r:   rC   r*   r0   r6   r1   r8   r;   r,   r<   r>   r?   r@   rA   rH   rT   r[   rV   rF   rL   rG   r\   r]   re   rc   rf   r`   rg   rb   rY   rD   rF   rL   rE   rI   rR   rS   rJ   r=   r^   r_   rd   rh   rZ   ra   rK   rM   rN   rO   rP   rQ   N)backendsr   r   r   r   r   r   r   r	   r
   r   r   compatr   r   r   configr   r   r   initializersr   r   r   r   r   layersr   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   lossri   rj   rk   rl   modelrm   rn   ro   rp   rq   rr   
optimizersrs   rt   ru   rv   	schedulesrw   rx   ry   rz   r{   r|   r}   shimsr~   r   r   r   r   r   r   r   typesr   r   r   r   utilr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   __all__ r   r   =/home/ubuntu/.local/lib/python3.10/site-packages/thinc/api.py<module>   s   4 N S $(	
T