Calculates the output shape of Pytorch operations
Project description
Torchshape
Calculates the output shape of Pytorch operations
How to use:
-
Install torchshape package:
pip install torchshape -
Import torchshape package:
from torchshape import tensorshape -
Call tensorshape function in your code:
outshape = tensorshape(op, inshape)
where op is a torch.nn operation (see the list of supported operations), inshape and outshape are tuples.
See lenet.py for example usage.
List of supported operations
- nn.Conv2d
- nn.Linear
- nn.MaxPool2d
- nn.AvgPool2d
- nn.Flatten
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torchshape-0.0.8.tar.gz.
File metadata
- Download URL: torchshape-0.0.8.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e04082ea6a38a3661469a9a4b4839f15716fda95d366bb8247bcdc46540012b3
|
|
| MD5 |
5751a5756457f2083e4665a507c432d9
|
|
| BLAKE2b-256 |
cb32899363c18fd03c7c27caba0511c6f654d73d49751f4b39858b3c8e3ad689
|
File details
Details for the file torchshape-0.0.8-py3-none-any.whl.
File metadata
- Download URL: torchshape-0.0.8-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4674e411570337ae314d617f5d981805caf176b84e29e5b3a77ce83bcc9d83e7
|
|
| MD5 |
6136db39a9db1ef1c22b7db351d6982d
|
|
| BLAKE2b-256 |
bd59c1f933874344922e9ea8cc26918c014b6329d655a49ba5b93522813abfe1
|