<commit_before># Adversarial Autoencoder
Replicates Adversarial Autoencoder architecture from [Makhzani, Alireza, et al. "Adversarial autoencoders." arXiv preprint arXiv:1511.05644 (2015)](https://arxiv.org/abs/1511.05644). 



The code is adapted from Naresh's implementation [here](https://github.com/Naresh1318/Adversarial_Autoencoder). Thanks Naresh!

## Training

To train the adversarial autoencoder, run:
```
python adversarialautoencoder.py --train
```

This downloads the MNIST dataset into the `./Data` directory.
It also creates a `./Results` directory to store log files, Tensorboard files and saved models.

## Generate Sample Images

### Single Image

After training a model (at least 1 epoch), generate a single image using:
```
python adversarialautoencoder.py --sample
```

Use `-z` to input a latent vector.
For example, 
```
python adversarialautoencoder.py --sample -z [-10,-10]
```
will generate an image from latent vector [-10,-10].<commit_msg>Added General section to README.md<commit_after># Adversarial Autoencoder
Replicates Adversarial Autoencoder architecture from [Makhzani, Alireza, et al. "Adversarial autoencoders." arXiv preprint arXiv:1511.05644 (2015)](https://arxiv.org/abs/1511.05644). 

The code is adapted from Naresh's implementation [here](https://github.com/Naresh1318/Adversarial_Autoencoder). Thanks Naresh!

## General

For help and details on options, just run the script without any options:
```
python adversarialautoencoder.py
```

## Training

To train the adversarial autoencoder, run:
```
python adversarialautoencoder.py --train
```

This downloads the MNIST dataset into the `./Data` directory.
It also creates a `./Results` directory to store log files, Tensorboard files and saved models.

## Generate Sample Images

### Single Image

After training a model (at least 1 epoch), generate a single image using:
```
python adversarialautoencoder.py --sample
```

Use `-z` to input a latent vector.
For example, 
```
python adversarialautoencoder.py --sample -z [-10,-10]
```
will generate an image from latent vector [-10,-10].
{'fraction_non_alphanumeric': 0.10860163382988948, 'fraction_numerical': 0.03363767419509851, 'mean_word_length': 4.88135593220339, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4452899', 'n_tokens_mistral': 686, 'n_tokens_neox': 578, 'n_words': 229}