This Python module provides a collection of utility functions designed for advanced tensor manipulation using PyTorch. It includes functions for applying operations along specific dimensions, mapping values to new ranges, and generating linearly spaced tensors, among others.
Project description
PyTorch Extension
Overview
This Python module provides a collection of utility functions designed for advanced tensor manipulation using PyTorch. It includes functions for applying operations along specific dimensions, mapping values to new ranges, and generating linearly spaced tensors, among others.
Patchwork
A new module that handles patches, for instance, unfold, fold, unfold_space, fold_space, and fold_stack. These functions were tested and work well and fast (for instance, fold_stack, as a substitute for the PyTorch official torch.nn.functional.fold, is faster than that).
Moreover, module convolution and pool have been developed from that, many of them works well by some tests, but limited (masked version was only tested for their forward process), they will be tested more rigorously in the future.
Functions
buffer(tensor, persistent)
Used in the nn.Module, for registering a buffer in an assignment form.
map_range(tensor, interval, dim, dtype, scalar_default, eps)
Maps tensor values to a specified range.
map_ranges(tensor, intervals, dim=None, dtype, scalar_default, eps)
Maps tensor values to multiple specified ranges.
invert(tensor)
Inverts the values in the tensor across its dimensions.
nn.Buffer(tensor, persistent)
The class that used in the buffer(tensor, persistent).
Usage
These functions are intended for use with PyTorch tensors in deep learning and numerical computation contexts. Each function provides additional control over tensor operations, particularly in high-dimensional data manipulation and preprocessing.
Project details
Release history Release notifications | RSS feed
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 torchflint-0.0.1b14.tar.gz.
File metadata
- Download URL: torchflint-0.0.1b14.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
726a8743d3501e9189e2cdf3b1130c43cde3d0d9b50bb2ecf8ee78d76e3c4cdf
|
|
| MD5 |
079d9be8940d76f776e1e1c9cb5637e2
|
|
| BLAKE2b-256 |
ecd5ff2771ef46a5751615ddd17e408fdd092a12b90f3443ec8094fc6c41c9ea
|
File details
Details for the file torchflint-0.0.1b14-py3-none-any.whl.
File metadata
- Download URL: torchflint-0.0.1b14-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89256a9357a252e51ae5fb735df0544aba19b5b99b2df706eb488d80b7ef1d7a
|
|
| MD5 |
cdca42506714f9f19930fff4f98511bb
|
|
| BLAKE2b-256 |
07c82483c6b66f77bc47289ac89aab319ed607fcb91d0d3d0fecd410c2eb5e92
|