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.

Moreover, module convolution and pool have been developed from that, many of them works well by some tests, but limited (only forward part), 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.

apply_from_dim(func, tensor, dim, otypes)

Applies a given function to a specified dimension of a tensor.

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.refine_model(model)

Extracts the underlying model from a DataParallel wrapper, if present.

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.1b12.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.1b12-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchflint-0.0.1b12.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.1b12.tar.gz
Algorithm Hash digest
SHA256 209a9ee840088a56c02847dd29e0a7808b43381998867daec16faaab8a2a05f6
MD5 a2a53a69dafb53049e76e7a81c158fff
BLAKE2b-256 8e3cc61ccefef45f8ed044307812f854de71432ef0581733a355d70550a3e0f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchflint-0.0.1b12-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.1b12-py3-none-any.whl
Algorithm Hash digest
SHA256 2ece23d9710c6c6ce5f6ae78b581aaf777032d6baa4597c2c71fd1d0910f79cd
MD5 ec325b07891c8fff6de7796727decf58
BLAKE2b-256 da0fcc9c75501a645f110de3bedcf0855ed8adf542d270a1ba8898068f75e7a3

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