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.
Metadata
Release files for torch-extension 0.0.1.3.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| torch_extension-0.0.1.3.9.tar.gz | 16.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| torch_extension-0.0.1.3.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.7 kB
Release files / torch_extension-0.0.1.3.9.tar.gz
| Download URL | torch_extension-0.0.1.3.9.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5369b65557184c76bc367563c5ebc8c64be7d18d473d62bea8a51ace0f1db4f7
|
|
BLAKE2b-256 checksum How to use checksums |
a16376da469d7f0ba2700a8b853b0afb6253828edd6cef13a881bcb5be680866
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.0
|
Release files / torch_extension-0.0.1.3.9-py3-none-any.whl
| Download URL | torch_extension-0.0.1.3.9-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac8f1a97da3ade9a8cec07e0cf852d304905229ea1b647fd1ab5fa9a39a87a16
|
|
BLAKE2b-256 checksum How to use checksums |
72b8c5a22ecde6ce2b9fd28f73b4d8e4cfd190301d6253a0c220bbb381a6e835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.0
|