Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torchflint-0.0.1b13.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torchflint-0.0.1b13-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file torchflint-0.0.1b13.tar.gz.

File metadata

  • Download URL: torchflint-0.0.1b13.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for torchflint-0.0.1b13.tar.gz
Algorithm Hash digest
SHA256 b10af3791a01b767a9c0856581ff3697b6a2488d0dc3797f00ea18a117b95c79
MD5 755a2fdfc181399b7cc871674308befd
BLAKE2b-256 db6b0b85ba6751e42f460978d6c3683b872acf9096cc1f3a9397de483a413e19

See more details on using hashes here.

File details

Details for the file torchflint-0.0.1b13-py3-none-any.whl.

File metadata

  • Download URL: torchflint-0.0.1b13-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for torchflint-0.0.1b13-py3-none-any.whl
Algorithm Hash digest
SHA256 1da8892de6f759715f72018ce05f4e5be0d05d7f87fcf2ba13c3f81f27900e4d
MD5 a39e5d747116b5d2c6728e326982fa51
BLAKE2b-256 4a2759b39f9107b67dba4b5935e355084e62fb4f6ae0f3e8844ee9418cb52f26

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page