All Projects → AgentMaker → Paddle-SEQ

AgentMaker / Paddle-SEQ

Licence: MIT license
低代码序列数据处理框架,最短两行即可完成训练任务!

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Paddle-SEQ

Paddle-PerceptualSimilarity
LPIPS metric on PaddlePaddle. pip install paddle-lpips
Stars: ✭ 22 (+69.23%)
Mutual labels:  paddle, paddlepaddle
PaddleTokenizer
使用 PaddlePaddle 实现基于深度神经网络的中文分词引擎 | A DNN Chinese Tokenizer by Using PaddlePaddle
Stars: ✭ 14 (+7.69%)
Mutual labels:  paddle, paddlepaddle
PLSC
Paddle Large Scale Classification Tools,supports ArcFace, CosFace, PartialFC, Data Parallel + Model Parallel. Model includes ResNet, ViT, DeiT, FaceViT.
Stars: ✭ 113 (+769.23%)
Mutual labels:  paddle, paddlepaddle
Netron
Visualizer for neural network, deep learning, and machine learning models
Stars: ✭ 17,193 (+132153.85%)
Mutual labels:  deeplearning, paddle
Paddle-Adversarial-Toolbox
Paddle-Adversarial-Toolbox (PAT) is a Python library for Deep Learning Security based on PaddlePaddle.
Stars: ✭ 16 (+23.08%)
Mutual labels:  paddle, paddlepaddle
godpaper
🐵 An AI chess-board-game framework(by many programming languages) implementations.
Stars: ✭ 40 (+207.69%)
Mutual labels:  deeplearning
Deep-Reinforcement-Learning-for-Boardgames
Master Thesis project that provides a training framework for two player games. TicTacToe and Othello have already been implemented.
Stars: ✭ 17 (+30.77%)
Mutual labels:  deeplearning
blockchain-predictor
Deep leraning cryptocurrency prediction with blockchain-based dataset
Stars: ✭ 34 (+161.54%)
Mutual labels:  deeplearning
datascience-mashup
In this repo I will try to gather all of the projects related to data science with clean datasets and high accuracy models to solve real world problems.
Stars: ✭ 36 (+176.92%)
Mutual labels:  deeplearning
AI-for-Security-Testing
My AI security testing projects
Stars: ✭ 34 (+161.54%)
Mutual labels:  deeplearning
deep-learning-platforms
deep-learning platforms,framework,data(深度学习平台、框架、资料)
Stars: ✭ 17 (+30.77%)
Mutual labels:  paddlepaddle
BookSource
《深度学习应用实战之PaddlePaddle》的源码
Stars: ✭ 17 (+30.77%)
Mutual labels:  paddlepaddle
type4py
Type4Py: Deep Similarity Learning-Based Type Inference for Python
Stars: ✭ 41 (+215.38%)
Mutual labels:  deeplearning
DeepPixel
An open-source Python package for making computer vision and image processing simpler
Stars: ✭ 21 (+61.54%)
Mutual labels:  deeplearning
Implicit-Internal-Video-Inpainting
[ICCV 2021]: IIVI: Internal Video Inpainting by Implicit Long-range Propagation
Stars: ✭ 190 (+1361.54%)
Mutual labels:  deeplearning
FSL-Mate
FSL-Mate: A collection of resources for few-shot learning (FSL).
Stars: ✭ 1,346 (+10253.85%)
Mutual labels:  paddlepaddle
insight-face-paddle
End-to-end face detection and recognition system using PaddlePaddle.
Stars: ✭ 52 (+300%)
Mutual labels:  paddlepaddle
Paddle-Custom-Operators
Paddle Custom Operators.
Stars: ✭ 24 (+84.62%)
Mutual labels:  paddlepaddle
machine-learning-notebook-series
Jupyter notebook series for machine learning and deep learning.
Stars: ✭ 14 (+7.69%)
Mutual labels:  deeplearning
continuous Bernoulli
There are C language computer programs about the simulator, transformation, and test statistic of continuous Bernoulli distribution. More than that, the book contains continuous Binomial distribution and continuous Trinomial distribution.
Stars: ✭ 22 (+69.23%)
Mutual labels:  deeplearning

PaddleSEQ(PaddleSequence) - EAP

EAP 当前版本为测试版,可能会有重大调整

低代码的序列数据处理框架,使用时只需输入数据和几行代码即可自动完成模型搭建、训练、预测等工作,显著降低使用成本。

项目依赖 - 在使用前需自行安装

paddlepaddle >= 2.0.1 或 paddlepaddle-gpu >= 2.0.1
paddlenlp
wget

支持模型以及任务

文本分类

LSTM
BiLSTM
BiLSTMAttention
GRU
BiGRU
BOW
CNN

预览效果

当前版本仍为EAP阶段,预计0.10-alpha版本后续发布,发布时将提供whl包
Warning:暂不支持模型一键保存,推理时可能需要预先读取训练数据,下次迭代将支持该部分

训练部分 - 可自动从数据中出识别常见的深度学习任务类型,无需手动选择

from paddleseq import AutoDataset, AutoModel, SEQNetwork

train_texts = ["文本1", "文本2", "文本3", "文本4", "文本5"]
train_labels = ["标签1", "标签2", "标签3", "标签4", "标签5"]
dataset = AutoDataset(train_texts=train_texts, train_labels=train_labels)

model = AutoModel(dataset, network=SEQNetwork.LSTM).run(batch_size=1)

推理部分 - 加载模型后输入数据即可得到结果

out = model.infer(["文本1"])
print(out) -> "标签1"

尝鲜体验

代码部分

from paddleseq import AutoDataset, AutoModel, SEQDevice, SEQNetwork
from paddlenlp.datasets.chnsenticorp import ChnSentiCorp

# 加载ChnSentiCorp数据,并转换为["文本1", "文本2", "文本3", "文本4", "文本5"]形式
def get_chnsenticorp_data(mode="train"):
    texts = list()
    labels = list()
    for sample in ChnSentiCorp(mode):
        texts.append(sample[0])
        labels.append("积极" if sample[1] == "1" else "消极")
    return texts, labels


train_texts, train_labels = get_chnsenticorp_data()
dev_texts, dev_labels = get_chnsenticorp_data("dev")

# 调用AutoDataset
dataset = AutoDataset(train_texts=train_texts,
                      train_labels=train_labels,
                      eval_texts=dev_texts,
                      eval_labels=dev_labels)

# 准备模型 此处可指定device=SEQDevice.GPU参数来设置GPU模式,默认为在PaddlePaddle-GPU版本后自动选择为GPU模式,其他情况为CPU执行
model = AutoModel(dataset, network=SEQNetwork.LSTM)

# 开始训练
model.run(batch_size=16, epochs=30)

# 抽取5条数据进行预测
for i in range(5, 10):
    t = dev_texts[i]
    out = model.infer(t)
    # 输出文本前30个字以及对应的预测Top-5结果
    print(t[:min(30, len(t))], out)

执行结果

房间地毯太脏,临近火车站十分吵闹,还好是双层玻璃。服务一般, [('消极', 0.99804676), ('积极', 0.0019532393)]
本来想没事的时候翻翻,可惜看不下去,还是和张没法比,他的书能 [('消极', 0.9957178), ('积极', 0.0042821327)]
这台机外观十分好,本人喜欢,性能不错,是LED显示屏,无线网 [('积极', 0.8226457), ('消极', 0.17735426)]
全键盘带数字键的 显卡足够强大.N卡相对A卡,个人偏向N卡  [('积极', 0.9961617), ('消极', 0.003838286)]
做工很漂亮,老婆很喜欢。T4200足够了,性价比不错的机器。 [('积极', 0.9995653), ('消极', 0.0004346288)]

项目许可

本项目采用MIT开源协议为开源许可,使用时请标注项目来源PaddleSEQ/PaddleSequence & 组织AgentMaker & GT-ZhangAcer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].