Skip to main content

Yoctol Natural Language Text Autoencoder

Project description

# 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/"
```


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text-autoencoder-0.0.1.tar.gz (51.9 kB view details)

Uploaded Source

Built Distribution

text_autoencoder-0.0.1-py3-none-any.whl (111.3 kB view details)

Uploaded Python 3

File details

Details for the file text-autoencoder-0.0.1.tar.gz.

File metadata

  • Download URL: text-autoencoder-0.0.1.tar.gz
  • Upload date:
  • Size: 51.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for text-autoencoder-0.0.1.tar.gz
Algorithm Hash digest
SHA256 674b8e3085fc062fa231e285e37efad9ba06bdad08e5df01507f0f16426a6176
MD5 08416d3cae2b194ed9c62484f2c22da1
BLAKE2b-256 eaf435cbfb645398b3b1d61a115f5a28bea3ba6b8b288e623ff57427ff84a3b6

See more details on using hashes here.

File details

Details for the file text_autoencoder-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: text_autoencoder-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 111.3 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for text_autoencoder-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a74e3a3cef1e5b02bd931e1bd40f1b30802dc4f4434e64b1010ea7e21af01a1
MD5 e3032ac7eca9a0058e3032c9c871c7d2
BLAKE2b-256 37bd3620ae4eeacffc6b105533738f6e740d2bab0088a7569e2c8ac4a4f32ba0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page