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

TorchFlint

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.1b15.tar.gz (27.5 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.1b15-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchflint-0.0.1b15.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

Hashes for torchflint-0.0.1b15.tar.gz
Algorithm Hash digest
SHA256 de3f8b92aca18955555fda44a9d04d417a5d87d6a16888a03e27868f953388b4
MD5 9c699d9a7f882ae336241e92ff1660df
BLAKE2b-256 8be5876d167364f3d0fde84c203dcb02761ab35b37f8104073ec63d34748c377

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchflint-0.0.1b15-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

Hashes for torchflint-0.0.1b15-py3-none-any.whl
Algorithm Hash digest
SHA256 9ba74d12a01acba8fc045795948c0ddb754a16169499e6a00a85cd779fca07b9
MD5 fb9fdd9eb6700683b3a4ba9368e7c342
BLAKE2b-256 7fce53d5d45fd5754785b8026cade63ba71fa24f8929fb47677b3b0b3eb0e5e6

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