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.

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.

min_dims(tensor, dims, keepdim, out)

Computes the minimum values over specified dimensions.

max_dims(tensor, dims, keepdim, out)

Computes the maximum values over specified dimensions.

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.

gamma(input, out)

Calculates the gamma function for each element in the tensor.

gamma_div(left, right, out)

Calculates the division of gamma functions for corresponding elements of two tensors.

recur_lgamma(n, base)

Calculates the recursive logarithm of the gamma function.

arith_gamma_prod(arith_term, arith_base, ratio_base)

Calculates the product of terms using the arithmetic series and gamma function.

linspace(start, stop, num, dtype)

Generates linearly spaced values between start and stop, supporting Tensor as input.

linspace_at(index, start, stop, num, dtype)

Generates linearly spaced values at specific indices.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchflint-0.0.1b8.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.0

File hashes

Hashes for torchflint-0.0.1b8.tar.gz
Algorithm Hash digest
SHA256 d62e3c5dbb0e48628cdb1ae77a32442a8b562b60e6c65d93a66db7b0db52bd2f
MD5 1ab6970032c735163f8b482b31829ae0
BLAKE2b-256 1c9577d43de1981e6611dbf3523a287e1b4221d60b1ba073dc0bc22c06ed54a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchflint-0.0.1b8-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.0

File hashes

Hashes for torchflint-0.0.1b8-py3-none-any.whl
Algorithm Hash digest
SHA256 f0a1afae831b01ab1b251c481703ed1bf3d727328a69b937fa78c63f80f70aa2
MD5 3a57f83ce967a3cfc57a56777b6a498f
BLAKE2b-256 beab86dd2b1c690a20f5869e6c975f5c9442fbab7223b8846b80185e813a1bd1

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