Comments (2)
I have added the LeakGAN instructor leakgan_instructor.py
in `instructor/real_data', please refer to it.
For a custom dataset, the steps should be as follows:
-
Preprocess dataset files, one sentence per line, ending with '\n'. Put them into
dataset
folder, training data should be placed in the root ofdataset
and testing data should be placed in thetestdata
. -
Please refer to the function
init_dict()
inutils/text_process.py
, similarly add the code to load your custom dataset files. (This function will automatically initialing dictionary based ondataset
args in the future.) -
Now you can design your own Instructor. The main differences of instructors between oracle data and real data are:
-
self.oracle_data
should load training data (config.train_data
) and add aself.test_data
loading testing data (config.test_data
). -
Add BLEU metrics.
-
The positive samples for discriminator should be `self.oracle_data.target' now.
-
Remove the evaluation process of discriminator since there is no validation data.
-
Change the way of saving generator's samples. Before changing
write_tensor
towrite_tokens
, usetensor_to_tokens()
to transform Tensor to word tokens.
-
See 'instructor/real_data/leakgan_instructor.py' for more details.
Please don't worry that these questions will bother me. These also help me to improve my code.
from textgan-pytorch.
Perfect, thanks a lot! 🙏
from textgan-pytorch.
Related Issues (20)
- Sentigan generates repetitive samples HOT 2
- Can you tell me the GPU model and running time when running CatGaN?
- How to generate samples from the trained SeqGan Model?
- AttributeError: 'MaliGANInstructor' object has no attribute 'train_data' HOT 3
- Some questions about the evaluation metrics
- Senti-GAN loss function -ve sign
- Execution in CPU-only Mode HOT 3
- Question about the onehot encoding
- Description data
- Runtime Error when running LeakGAN HOT 1
- How does seqgan train on real data? HOT 2
- SentiGAN reproducible results?
- question about seqgan rollout code
- Cite as and citations for datasets
- catGAN real dataset
- Training catGAN with a custom dataset: AttributeError: 'CatGANInstructor' object has no attribute 'train_samples_list'
- Question about the executable parameter of subprocess.call
- Gradient problem
- save
- Hello teacher
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textgan-pytorch.