Skip to main content
# text-autoencoder

[![travis][travis-image]][travis-url]
[![pypi][pypi-image]][pypi-url]

[travis-image]: https://img.shields.io/travis/Yoctol/text-autoencoder.svg?style=flat
[travis-url]: https://travis-ci.org/Yoctol/text-autoencoder
[pypi-image]: https://img.shields.io/pypi/v/text-autoencoder.svg?style=flat
[pypi-url]: https://pypi.python.org/pypi/text-autoencoder

Various autoencoder for text data.

## Usage

### Grab one autoencoder first
```python
from text_autoencoder.variational_autoencoders import VAEXXX
model = VAEXXX(n_steps=..., latent_size=..., state_size=..., ...)
```

### How to train
- Warning: please preprocess your data to be a numpy array with shape (data_size, maxlen, embedding_size)
```python
model.fit(x=..., mask=..., epochs=10)
```

### How to save model
```python
model.save(output_path)
```

### How to get latent vector `z`
```python
model.get_latent_vector(x=..., mask=..., batch_size=1)
```

### How to get output of encoder
```python
model.encode(x=..., mask=..., batch_size=1)
```

### How to load a trained model
```python
model.load(path)
```

### How to monitor the training process
- get the output_dir you input when calling `model.fit`
- monitor training loss
```shell
> tensorboard --logdir="<output_dir>/summary/subtrain/"
```

- monitor validation loss
```shell
> tensorboard --logdir="<output_dir>/summary/valid/"
```


Metadata

Release files for text-autoencoder 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for text-autoencoder 0.0.1
File Size Uploaded
text-autoencoder-0.0.1.tar.gz 51.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for text-autoencoder 0.0.1
File Interpreter ABI Platform
text_autoencoder-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 163.1 kB

Release files / text-autoencoder-0.0.1.tar.gz

Download URL text-autoencoder-0.0.1.tar.gz
Size 51.9 kB
Tags Source
SHA-256 checksum
How to use checksums
674b8e3085fc062fa231e285e37efad9ba06bdad08e5df01507f0f16426a6176
BLAKE2b-256 checksum
How to use checksums
eaf435cbfb645398b3b1d61a115f5a28bea3ba6b8b288e623ff57427ff84a3b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.2

Release files / text_autoencoder-0.0.1-py3-none-any.whl

Download URL text_autoencoder-0.0.1-py3-none-any.whl
Size 111.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a74e3a3cef1e5b02bd931e1bd40f1b30802dc4f4434e64b1010ea7e21af01a1
BLAKE2b-256 checksum
How to use checksums
37bd3620ae4eeacffc6b105533738f6e740d2bab0088a7569e2c8ac4a4f32ba0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.2

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page