Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyberzhg/keras-embed-sim
Calculate similarity with embedding
https://github.com/cyberzhg/keras-embed-sim
embedding keras
Last synced: about 1 month ago
JSON representation
Calculate similarity with embedding
- Host: GitHub
- URL: https://github.com/cyberzhg/keras-embed-sim
- Owner: CyberZHG
- License: mit
- Archived: true
- Created: 2018-12-09T08:51:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-22T09:41:59.000Z (almost 3 years ago)
- Last Synced: 2024-09-30T16:08:09.202Z (about 1 month ago)
- Topics: embedding, keras
- Language: Python
- Homepage: https://pypi.org/project/keras-embed-sim/
- Size: 15.6 KB
- Stars: 11
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Keras Embedding Similarity
[![Version](https://img.shields.io/pypi/v/keras-embed-sim.svg)](https://pypi.org/project/keras-embed-sim/)
![License](https://img.shields.io/pypi/l/keras-embed-sim.svg)\[[中文](https://github.com/CyberZHG/keras-embed-sim/blob/master/README.zh-CN.md)|[English](https://github.com/CyberZHG/keras-embed-sim/blob/master/README.md)\]
Compute the similarity between the outputs and the embeddings.
## Install
```bash
pip install keras-embed-sim
```## Usage
```python
from tensorflow import keras
from keras_embed_sim import EmbeddingRet, EmbeddingSiminput_layer = keras.layers.Input(shape=(None,), name='Input')
embed, embed_weights = EmbeddingRet(
input_dim=20,
output_dim=100,
mask_zero=True,
)(input_layer)output_layer = EmbeddingSim()([embed, embed_weights])
```