<commit_before># Design for GAN

GAN (General Adversarial Net) is an important model for unsupervised learning and widely used in many areas. 

It contains several important machine learning concepts, including building and running subgraphs, dependency tracing, different optimizers in one executor and so forth.

In our GAN design, we wrap it as a user-friendly easily customized python API to design different models. We take the conditional DC-GAN as an example due to its good performance on image generation.

| important building blocks | People in Charge  | Required |
|---------------------------|-------------------|----------|
| convolution 2d (done)     | Chengduo          | Y        |
| cudnn conv 2d (missing)   | Chengduo          | N        |
| deconv 2d (missing)       | Zhuoyuan, Zhihong | Y        |
| cudnn deconv 2d (missing) | Zhuoyuan, Zhihong | N        |
| batch norm (missing)      | Zhuoyuan, Jiayi   | Y        |
| cudnn batch norm (missing)| Zhuoyuan, Jiayi   | N        |
| max-pooling (done)        | ?                 | Y        |
| fc (done)                 | ?                 | Y        |
| softmax loss (done)       | ?                 | Y        |
| reshape op (done)         | ?                 | Y        |
| Dependency Engine (done)  | Jiayi             | Y *      |
| Python API (done)         | Longfei, Jiayi    | Y *      |
| Executor (done)           | Tony              | Y *      |
| Multi optimizer (woking)  | Longfei           | Y *      |
| Optimizer with any para   | ?                 | Y *      |
| Concat op (done)          | ?                 | N (Cond) |
| Repmat op (done)          | ?                 | N (Cond) |


<p align="center">
<img src="./dcgan.png" width = "90%" align="center"/><br/>
Borrow this photo from the original DC-GAN paper.
</p>

## The Conditional-GAN might be a class. 
This design we adopt the popular open source design in https://github.com/carpedm20/DCGAN-tensorflow and https://github.com/rajathkmp/DCGAN. It contains following data structure:

- DCGAN(object): which contains everything required to build a GAN model. It provides following member functions methods as API:<commit_msg>gan api<commit_after># Design for GAN

GAN (General Adversarial Net) is an important model for unsupervised learning and widely used in many areas. 

It contains several important machine learning concepts, including building and running subgraphs, dependency tracing, different optimizers in one executor and so forth.

In our GAN design, we wrap it as a user-friendly easily customized python API to design different models. We take the conditional DC-GAN as an example due to its good performance on image generation.

| important building blocks | People in Charge  | Required |
|---------------------------|-------------------|----------|
| convolution 2d (done)     | Chengduo          | Y        |
| cudnn conv 2d (missing)   | Chengduo          | N        |
| deconv 2d (missing)       | Zhuoyuan, Zhihong | Y        |
| cudnn deconv 2d (missing) | Zhuoyuan, Zhihong | N        |
| batch norm (missing)      | Zhuoyuan, Jiayi   | Y        |
| cudnn batch norm (missing)| Zhuoyuan, Jiayi   | N        |
| max-pooling (done)        | ?                 | Y        |
| cudnn-max-pool (missing)  | Chengduo          | Y        |
| fc (done)                 | ?                 | Y        |
| softmax loss (done)       | ?                 | Y        |
| reshape op (done)         | ?                 | Y        |
| Dependency Engine (done)  | Jiayi             | Y *      |
| Python API (done)         | Longfei, Jiayi    | Y *      |
| Executor (done)           | Tony              | Y *      |
| Multi optimizer (woking)  | Longfei           | Y *      |
| Optimizer with any para   | ?                 | Y *      |
| Concat op (done)          | ?                 | N (Cond) |
| Repmat op (done)          | ?                 | N (Cond) |


<p align="center">
<img src="./dcgan.png" width = "90%" align="center"/><br/>
Borrow this photo from the original DC-GAN paper.
</p>

## The Conditional-GAN might be a class. 
This design we adopt the popular open source design in https://github.com/carpedm20/DCGAN-tensorflow and https://github.com/rajathkmp/DCGAN. It contains following data structure:

- DCGAN(object): which contains everything required to build a GAN model. It provides following member functions methods as API:
{'fraction_non_alphanumeric': 0.11815496478073165, 'fraction_numerical': 0.0036355373778686664, 'mean_word_length': 1.794920634920635, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4472747', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1209, 'n_words': 460}