Metadata-Version: 2.1
Name: torch-position-embedding
Version: 0.8.0
Summary: Position embedding implemented in PyTorch
Home-page: https://github.com/CyberZHG/torch-position-embedding
Author: CyberZHG
Author-email: CyberZHG@users.noreply.github.com
License: MIT
Description: # PyTorch Position Embedding
        
        [![Travis](https://travis-ci.org/CyberZHG/torch-position-embedding.svg)](https://travis-ci.org/CyberZHG/torch-position-embedding)
        [![Coverage](https://coveralls.io/repos/github/CyberZHG/torch-position-embedding/badge.svg?branch=master)](https://coveralls.io/github/CyberZHG/torch-position-embedding)
        
        ## Install
        
        ```bash
        pip install torch-position-embedding
        ```
        
        ## Usage
        
        ```python
        from torch_position_embedding import PositionEmbedding
        
        PositionEmbedding(num_embeddings=5, embedding_dim=10, mode=PositionEmbedding.MODE_ADD)
        ```
        
        Modes:
        
        * `MODE_EXPAND`: negative indices could be used to represent relative positions.
        * `MODE_ADD`: add position embedding to the original tensor.
        * `MODE_CAT`: concatenate position embedding to the original tensor.
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
