Metadata-Version: 2.4
Name: torchflint
Version: 0.0.1b11
Summary: 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.
Author-email: Caewinix <Caewinix@yeah.net>
Project-URL: Homepage, https://github.com/Caewinix/torchflint
Project-URL: Bug Tracker, https://github.com/Caewinix/torchflint/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=1.6.0
Requires-Dist: numpy
Requires-Dist: array-like-generic
Requires-Dist: pyreflex
Dynamic: license-file

# 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.

### `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.
