PyTorch Embedding Similarity
Install
pip install torch-embed-sim
Usage
from torch_embed_sim import EmbeddingSim
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.embed = torch.nn.Embedding(num_embeddings=10, embedding_dim=20)
self.embed_sim = EmbeddingSim(num_embeddings=10)
def forward(self, x):
return self.embed_sim(self.embed(x), self.embed.weight)
Metadata
Release files for torch-embed-sim 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| torch-embed-sim-0.3.2.tar.gz | 2.3 kB | Details |
Release files / torch-embed-sim-0.3.2.tar.gz
| Download URL | torch-embed-sim-0.3.2.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc2f93fafc8ebd50e5e325ee80578396865384b9897aa9eb6777b496c9e492c6
|
|
BLAKE2b-256 checksum How to use checksums |
9513c59c9a3318dfcebc12c20e04286709da09b0bb49620ac5a380bbf8e21aae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.7.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.4
|