scient
scient一个用python实现科学计算相关算法的包,包括自然语言、图像、神经网络、优化算法、机器学习、图计算等模块。
scient源码和编译安装包可以在Python package index获取。
The source code and binary installers for the latest released version are available at the [Python package index].
https://pypi.org/project/scient
可以用pip安装scient。
You can install scient like this:
pip install scient
也可以用setup.py安装。
Or in the scient directory, execute:
python setup.py install
scient.neuralnet
神经网络相关算法模块,包括attention、transformer、bert、lstm、resnet、crf、dataset、fit等。
scient.neuralnet.transformer
实现了多个Transformer模型,包括Transformer、T5Transformer、ViTransformer、DecodeTransformer、Encoder、Decoder。
scient.neuralnet.transformer.DecodeTransformer(vocab_size: int, seq_len: int = 512, embed_size: int = 512,
n_head: int = 8, n_layer: int = 6,
**kwargs)
Parameters
- vocab_size : int
字典规模. - seq_len : int, optional
序列长度. The default is 512. - embed_size : int, optional
embedding向量长度. The default is 512. - n_head : int, optional
multi_head_attention的head数量. The default is 8. - n_layer : int, optional
编码层数. The default is 6. - kwargs : 其它参数,kwargs中的参数将被传递到Encoder层和Decoder层。
Algorithms
GPT全称Generative Pretrained Transformer, 生成式预训练Transformer。
目前各种类型的Transformer可以分为四大架构:编码器-解码器架构(Encode-Decode)、编码器架构(Encode-Only)、因果解码器架构(Decode-Only)、前缀解码器架构(Prefix-Decode)。</

最低0.47元/天 解锁文章
4391

被折叠的 条评论
为什么被折叠?



