diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-keras-embed-sim.spec | 162 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 164 insertions, 0 deletions
@@ -0,0 +1 @@ +/keras-embed-sim-0.10.0.tar.gz diff --git a/python-keras-embed-sim.spec b/python-keras-embed-sim.spec new file mode 100644 index 0000000..0d1b8a9 --- /dev/null +++ b/python-keras-embed-sim.spec @@ -0,0 +1,162 @@ +%global _empty_manifest_terminate_build 0 +Name: python-keras-embed-sim +Version: 0.10.0 +Release: 1 +Summary: Calculate similarity with embedding +License: MIT +URL: https://github.com/CyberZHG/keras-embed-sim +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/d9/ac/641978394aaa28d90a81ae3e999ed8206c4c3223b7a668a5aa9ed6034db0/keras-embed-sim-0.10.0.tar.gz +BuildArch: noarch + + +%description +# Keras Embedding Similarity + +[](https://pypi.org/project/keras-embed-sim/) + + +\[[中文](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, EmbeddingSim + +input_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]) +``` + +%package -n python3-keras-embed-sim +Summary: Calculate similarity with embedding +Provides: python-keras-embed-sim +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-keras-embed-sim +# Keras Embedding Similarity + +[](https://pypi.org/project/keras-embed-sim/) + + +\[[中文](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, EmbeddingSim + +input_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]) +``` + +%package help +Summary: Development documents and examples for keras-embed-sim +Provides: python3-keras-embed-sim-doc +%description help +# Keras Embedding Similarity + +[](https://pypi.org/project/keras-embed-sim/) + + +\[[中文](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, EmbeddingSim + +input_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]) +``` + +%prep +%autosetup -n keras-embed-sim-0.10.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-keras-embed-sim -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 0.10.0-1 +- Package Spec generated @@ -0,0 +1 @@ +6a42b6ece775f46f595889209dbf0bf8 keras-embed-sim-0.10.0.tar.gz |
