Seq2seq Couplet

Play couplet with seq2seq model. 用深度学习对对联。
Alternatives To Seq2seq Couplet
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Tensorflow172,632327772 hours ago46October 23, 20192,246apache-2.0C++
An Open Source Machine Learning Framework for Everyone
Transformers89,017649113 hours ago91June 21, 2022634apache-2.0Python
🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
Pytorch64,6301462 hours ago23August 10, 202211,508otherC++
Tensors and Dynamic neural networks in Python with strong GPU acceleration
Keras57,76633015 hours ago68May 13, 2022375apache-2.0Python
Deep Learning for humans
Cs Video Courses53,706
11 days ago14
List of Computer Science courses with video lectures.
Faceswap43,824
a month ago15gpl-3.0Python
Deepfakes Software For All
Tensorflow Examples42,312
5 months ago218otherJupyter Notebook
TensorFlow Tutorial and Examples for Beginners (support TF v1 & v2)
D2l Zh41,168
112 hours ago45March 25, 202224apache-2.0Python
《动手学深度学习》:面向中文读者、能运行、可讨论。中英文版被60多个国家的400多所大学用于教学。
100 Days Of Ml Code40,344
18 days ago61mit
100 Days of ML Coding
Deepfacelab37,877
19 days ago510gpl-3.0Python
DeepFaceLab is the leading software for creating deepfakes.
Alternatives To Seq2seq Couplet
Select To Compare


Alternative Project Comparisons
Readme

This is a project use seq2seq model to play couplets () This project is written with Tensorflow. You can try the demo at https://ai.binwang.me/couplet.

Pre-requirements

  • Tensorflow
  • Python 3.6
  • Dataset

Dataset

You will need some data to run this program, the dataset can be downloaded from this project.

** Note: If you are using your own dataset, you need to add <s> and <\s> as the first two line into the vocabs file. **

Usage

Train

Open couplet.py and config the file locations and hyperparams. Then run python couplet.py to train the model. You can see the training loss and bleu score at Tensorbloard. You may need to re-config learning_rate when you find the loss stops descresing. Here is an example of the loss graph:

loss graph

If you stoped the training and want to continue to train it. You can set restore_model to True and use m.train(<epoches>, start=<start>), which start is the steps you've already run.

I've trained the model on a Nvidia GTX-1080 GPU for about 4 days.

Run the trained model

Open server.py and config the vocab_file and model_dir params. Then run python server.py will start a web service that can play couplet.

Or build the Docker image with Dockerfile and run it with Docker. Remember to mount the correct model file paths into the Docker container.

Examples

Here are some examples generated by this model:

Popular Machine Learning Projects
Popular Deep Learning Projects
Popular Machine Learning Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Python
Machine Learning
Deep Learning
Dataset
Play Framework
Sequence To Sequence
Seq2seq Model