/usr/local/lib/python3.6/site-packages/transformers/__pycache__
NameSizeModeActions
activations.cpython-36.pyc77500644editdlrm
activations_tf.cpython-36.pyc41360644editdlrm
configuration_utils.cpython-36.pyc393970644editdlrm
convert_graph_to_onnx.cpython-36.pyc160360644editdlrm
convert_pytorch_checkpoint_to_tf2.cpython-36.pyc91760644editdlrm
convert_slow_tokenizer.cpython-36.pyc304510644editdlrm
convert_slow_tokenizers_checkpoints_to_fast.cpython-36.pyc29500644editdlrm
convert_tf_hub_seq_to_seq_bert_to_pytorch.cpython-36.pyc18310644editdlrm
debug_utils.cpython-36.pyc110980644editdlrm
deepspeed.cpython-36.pyc128870644editdlrm
dependency_versions_check.cpython-36.pyc9610644editdlrm
dependency_versions_table.cpython-36.pyc20390644editdlrm
dynamic_module_utils.cpython-36.pyc139500644editdlrm
feature_extraction_sequence_utils.cpython-36.pyc128480644editdlrm
feature_extraction_utils.cpython-36.pyc225680644editdlrm
file_utils.cpython-36.pyc38030644editdlrm
generation_beam_constraints.cpython-36.pyc165560644editdlrm
generation_beam_search.cpython-36.pyc254400644editdlrm
generation_flax_logits_process.cpython-36.pyc110800644editdlrm
generation_flax_utils.cpython-36.pyc223200644editdlrm
generation_logits_process.cpython-36.pyc283870644editdlrm
generation_stopping_criteria.cpython-36.pyc63520644editdlrm
generation_tf_logits_process.cpython-36.pyc165240644editdlrm
generation_tf_utils.cpython-36.pyc863740644editdlrm
generation_utils.cpython-36.pyc1135760644editdlrm
hf_argparser.cpython-36.pyc89970644editdlrm
image_utils.cpython-36.pyc97300644editdlrm
integrations.cpython-36.pyc314040644editdlrm
keras_callbacks.cpython-36.pyc145290644editdlrm
modelcard.cpython-36.pyc261650644editdlrm
modeling_flax_outputs.cpython-36.pyc348780644editdlrm
modeling_flax_pytorch_utils.cpython-36.pyc83510644editdlrm
modeling_flax_utils.cpython-36.pyc286020644editdlrm
modeling_outputs.cpython-36.pyc590830644editdlrm
modeling_tf_outputs.cpython-36.pyc457330644editdlrm
modeling_tf_pytorch_utils.cpython-36.pyc125920644editdlrm
modeling_tf_utils.cpython-36.pyc709060644editdlrm
modeling_utils.cpython-36.pyc983820644editdlrm
optimization.cpython-36.pyc226530644editdlrm
optimization_tf.cpython-36.pyc134080644editdlrm
processing_utils.cpython-36.pyc85680644editdlrm
pytorch_utils.cpython-36.pyc11180644editdlrm
testing_utils.cpython-36.pyc432770644editdlrm
tf_utils.cpython-36.pyc12510644editdlrm
tokenization_utils.cpython-36.pyc258450644editdlrm
tokenization_utils_base.cpython-36.pyc1292790644editdlrm
tokenization_utils_fast.cpython-36.pyc219790644editdlrm
trainer.cpython-36.pyc818400644editdlrm
trainer_callback.cpython-36.pyc229060644editdlrm
trainer_pt_utils.cpython-36.pyc398290644editdlrm
trainer_seq2seq.cpython-36.pyc80280644editdlrm
trainer_tf.cpython-36.pyc255360644editdlrm
trainer_utils.cpython-36.pyc155710644editdlrm
training_args.cpython-36.pyc546000644editdlrm
training_args_seq2seq.cpython-36.pyc23170644editdlrm
training_args_tf.cpython-36.pyc128690644editdlrm
__init__.cpython-36.pyc1094310644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/transformers/__pycache__/activations.cpython-36.pyc (7750B)
3 Eg@sfddlZddlZddlmZddlmZmZddlmZeje Z Gdddej Z Gdd d ej Z Gd d d ej ZGd d d ej ZGdddej ZGdddej ZGdddej ZGdddej Zejeee eje dde eeed$deeejd ZddZedZedZedZedZed Zed!Zed"Zed#Z dS)%N)version)Tensornn)loggingc@s eZdZdZeedddZdS)NewGELUActivationz Implementation of the GELU activation function currently in Google BERT repo (identical to OpenAI GPT). Also see the Gaussian Error Linear Units paper: https://arxiv.org/abs/1606.08415 )inputreturnc Cs6d|dtjtjdtj|dtj|dS)Ng?g?g@gHm?g@)torchtanhmathsqrtpipow)selfrrB/usr/local/lib/python3.6/site-packages/transformers/activations.pyforward!szNewGELUActivation.forwardN)__name__ __module__ __qualname____doc__rrrrrrrsrcsHeZdZdZd edfdd ZeedddZeedd d ZZ S) GELUActivationa Original Implementation of the GELU activation function in Google BERT repo when initially created. For information: OpenAI GPT's GELU is slightly different (and gives slightly different results): 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))) This is now written in C in nn.functional Also see the Gaussian Error Linear Units paper: https://arxiv.org/abs/1606.08415 F)use_gelu_pythoncs<tjtjtjtjdks$|r.|j|_n tj j |_dS)Nz1.4) super__init__rparser __version__ _gelu_pythonactr functionalgelu)rr) __class__rrr-s  zGELUActivation.__init__)rr cCs |ddtj|tjdS)Ng?g?g@)r erfr r )rrrrrr4szGELUActivation._gelu_pythoncCs |j|S)N)r)rrrrrr7szGELUActivation.forward)F) rrrrboolrrrr __classcell__rr)r"rr%src@s eZdZdZeedddZdS)FastGELUActivationz} Applies GELU approximation that is slower than QuickGELU but more accurate. See: https://github.com/hendrycks/GELUs )rr cCs*d|dtj|ddd||S)Ng?g?g3E?gHm?)r r )rrrrrr@szFastGELUActivation.forwardN)rrrrrrrrrrr&;sr&c@s eZdZdZeedddZdS)QuickGELUActivationzr Applies GELU approximation that is fast but somewhat inaccurate. See: https://github.com/hendrycks/GELUs )rr cCs|tjd|S)NgZd;?)r sigmoid)rrrrrrIszQuickGELUActivation.forwardN)rrrrrrrrrrr'Dsr'cs8eZdZdZeedfdd ZeedddZZS)ClippedGELUActivationa Clip the range of possible GeLU outputs between [min, max]. This is especially useful for quantization purpose, as it allows mapping negatives values in the GeLU spectrum. For more information on this trick, please refer to https://arxiv.org/abs/2004.09602. Gaussian Error Linear Unit. Original Implementation of the gelu activation function in Google Bert repo when initially created. For information: OpenAI GPT's gelu is slightly different (and gives slightly different results): 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0.044715 * torch.pow(x, 3)))). See https://arxiv.org/abs/1606.08415 )minmaxcs8||krtd|d|dtj||_||_dS)Nzmin should be < max (got min: z, max: )) ValueErrorrrr*r+)rr*r+)r"rrrZs  zClippedGELUActivation.__init__)xr cCstjt||j|jS)N)r Zclipr!r*r+)rr.rrrrbszClippedGELUActivation.forward) rrrrfloatrrrr%rr)r"rr)Ms r)cs@eZdZdZfddZeedddZeedddZZS) SiLUActivationa See Gaussian Error Linear Units (Hendrycks et al., https://arxiv.org/abs/1606.08415) where the SiLU (Sigmoid Linear Unit) was originally introduced and coined, and see Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learning (Elfwing et al., https://arxiv.org/abs/1702.03118) and Swish: a Self-Gated Activation Function (Ramachandran et al., https://arxiv.org/abs/1710.05941v1) where the SiLU was experimented with later. cs8tjtjtjtjdkr*|j|_n tj j |_dS)Nz1.7) rrrrr r _silu_pythonrrr silu)r)r"rrros  zSiLUActivation.__init__)rr cCs|tj|S)N)r r()rrrrrr1vszSiLUActivation._silu_pythoncCs |j|S)N)r)rrrrrryszSiLUActivation.forward) rrrrrrr1rr%rr)r"rr0fs r0cs@eZdZdZfddZeedddZeedddZZS) MishActivationz See Mish: A Self-Regularized Non-Monotonic Activation Function (Misra., https://arxiv.org/abs/1908.08681). Also visit the official repository for the paper: https://github.com/digantamisra98/Mish cs8tjtjtjtjdkr*|j|_n tj j |_dS)Nz1.9) rrrrr r _mish_pythonrrr mish)r)r"rrrs  zMishActivation.__init__)rr cCs|tjtjj|S)N)r r rr Zsoftplus)rrrrrr4szMishActivation._mish_pythoncCs |j|S)N)r)rrrrrrszMishActivation.forward) rrrrrrr4rr%rr)r"rr3}s r3c@s eZdZdZeedddZdS)LinearActivationz[ Applies the linear activation function, i.e. forwarding input directly to output. )rr cCs|S)Nr)rrrrrrszLinearActivation.forwardN)rrrrrrrrrrr6sr6T)r ) Zrelur2Zswishr!r gelu_pythongelu_new gelu_fast quick_geluZgelu_10r5linearr(cCs0|tkrt|Std|dttjdS)Nz function z not found in ACT2FN mapping )ACT2FNKeyErrorlistkeys)Zactivation_stringrrrget_activationsrAr8r9r!r:r;r2r5r<i)!r r packagingrrrutilsr get_loggerrloggerModulerrr&r'r)r0r3r6ZReLUZTanhZSigmoidr=rAr8r9r!r:r;r2r5Z linear_actrrrrsF