The geospatial pooling modules for neural networks in PyTorch
Project description
Torch Geopooling - The geospatial pooling library for PyTorch
The Torch Geopooling library is an extension for PyTorch library that provide extra layers for building geospatial neural networks.
Here is an example of how you can use modules from Torch Geopooling library to train neural
networks predicting geospatial features:
Installation
The library is distributed as PyPI package, to install that package, execute the following command:
pip install torch_geopooling
You can use the torch_geopooling library for building neural networks with geospatial indexing.
The interface of the provided modules is compatible with PyTorch library,
including automatic gradient computation.
Documentation
The Torch Geopooling Documentation contains additional details on how to get started with this library as well a few examples of training neural networks that use geo-pooling modules.
Usage
The module provides adaptive and regular modules that implement decomposition of point coordinates in 2-dimensional space. Decomposition in this context implies separation of the space into rectangles (quads).
Adaptive modules are building the decomposition during the training, while for regular modules the decomposition should be computed beforehand. As a result, adaptive module builds sparse decomposition, while regular module builds dense (regular) decomposition.
Using adaptive decomposition module for EPSG:4326 coordinates:
import torch
from torch_geopooling.nn import AdaptiveQuadPool2d
# Create 5-feature vector for each node in a decomposition.
pool = AdaptiveQuadPool2d(5, (-180, -90, 360, 180), max_depth=12, capacity=10)
input = torch.DoubleTensor(1024, 2).uniform_(-90, 90)
output = pool(input)
Using regular decomposition module for arbitrary polygon:
import torch
from shapely import Polygon
from torch_geopooling.nn import QuadPool2d
# Polygon for regular decomposition should be within an exterior boundary.
poly = Polygon([(0.0, 0.0), (10.0, 0.0), (10.0, 10.0), (0.0, 10.0)])
exterior = (-100.0, -100.0, 200.0, 200.0)
# Create 3-feature vector for each node in a decomposition.
pool = QuadPool2d(3, poly, exterior, max_depth=10)
input = torch.DoubleTensor(200, 2).uniform_(0.0, 10.0)
output = pool(input)
Using 2-dimensional embedding module for learning data on sphere:
import torch
from torch_geopooling.nn import Embedding2d
embedding = Embedding2d((16, 16, 2), padding=(3, 3), exterior=(-100, 100, 200.0, 200.0))
input = torch.DoubleTensor(1024, 2).normal_(5.0, 1.0)
output = embedding(input)
License
The Torch Geopooling is distributed under GPLv3 license. See the LICENSE file for full license text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torch_geopooling-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: torch_geopooling-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d9fde9eac8a9931e43a0555eb8b304eb17a00b38efebe710eae2c09748f5495
|
|
| MD5 |
b328f9618ef5692396eca73e522c4cc4
|
|
| BLAKE2b-256 |
4aec3f7c8f65a60eb61ebbc723131da6f0d523dbfe576935c545b14f2f7b1d29
|
Provenance
The following attestation bundles were made for torch_geopooling-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl:
Publisher:
python_build_wheel.yaml on ybubnov/torch_geopooling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_geopooling-1.3.0-cp312-cp312-manylinux_2_28_x86_64.whl -
Subject digest:
0d9fde9eac8a9931e43a0555eb8b304eb17a00b38efebe710eae2c09748f5495 - Sigstore transparency entry: 714261880
- Sigstore integration time:
-
Permalink:
ybubnov/torch_geopooling@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/ybubnov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_build_wheel.yaml@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_geopooling-1.3.0-cp312-cp312-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: torch_geopooling-1.3.0-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9dbd4c7d308d99b2f633bf49695233e764278dc0b36dd87a2d534bef2c68181
|
|
| MD5 |
f56425428a0900e8cc08a7f6128f96af
|
|
| BLAKE2b-256 |
8c16b7b0c8e5731d37812b31e90df5d73aef9e69855036ed554f22b66fac4d0b
|
Provenance
The following attestation bundles were made for torch_geopooling-1.3.0-cp312-cp312-manylinux_2_28_aarch64.whl:
Publisher:
python_build_wheel.yaml on ybubnov/torch_geopooling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_geopooling-1.3.0-cp312-cp312-manylinux_2_28_aarch64.whl -
Subject digest:
b9dbd4c7d308d99b2f633bf49695233e764278dc0b36dd87a2d534bef2c68181 - Sigstore transparency entry: 714261917
- Sigstore integration time:
-
Permalink:
ybubnov/torch_geopooling@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/ybubnov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_build_wheel.yaml@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_geopooling-1.3.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: torch_geopooling-1.3.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 507.6 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
761de4229f649607e34e6c0b6b16c4e2bcae43144c2c20d555bfaf13189619c5
|
|
| MD5 |
a222a0462c517a7437855af1cd0c129e
|
|
| BLAKE2b-256 |
c3363c293b30c7895cfbfc27d02fccdff80ab25d65d50a60536a9426f79437bd
|
Provenance
The following attestation bundles were made for torch_geopooling-1.3.0-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
python_build_wheel.yaml on ybubnov/torch_geopooling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_geopooling-1.3.0-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
761de4229f649607e34e6c0b6b16c4e2bcae43144c2c20d555bfaf13189619c5 - Sigstore transparency entry: 714261844
- Sigstore integration time:
-
Permalink:
ybubnov/torch_geopooling@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/ybubnov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_build_wheel.yaml@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_geopooling-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: torch_geopooling-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38c6a293cef843a838a600695b76d941da45c7c2c7500b821f4fd23da107b0a6
|
|
| MD5 |
9ad81b091f3bde877453a0c0f294a2cb
|
|
| BLAKE2b-256 |
722ed0792d84d6260aeb41c100ea061732d9243e499d291964609891c9216ca7
|
Provenance
The following attestation bundles were made for torch_geopooling-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl:
Publisher:
python_build_wheel.yaml on ybubnov/torch_geopooling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_geopooling-1.3.0-cp311-cp311-manylinux_2_28_x86_64.whl -
Subject digest:
38c6a293cef843a838a600695b76d941da45c7c2c7500b821f4fd23da107b0a6 - Sigstore transparency entry: 714261951
- Sigstore integration time:
-
Permalink:
ybubnov/torch_geopooling@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/ybubnov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_build_wheel.yaml@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_geopooling-1.3.0-cp311-cp311-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: torch_geopooling-1.3.0-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ce40b0b36b391605e1e4d0a4fdc8ff5816c3963c316243e8e6e0ead8037b3ab
|
|
| MD5 |
281de5fbbf64e9c647dc285516dc0945
|
|
| BLAKE2b-256 |
f678a3cf62d886ba93005d659a38ebe12cd32462bf54b528ca0b20ebef1ab229
|
Provenance
The following attestation bundles were made for torch_geopooling-1.3.0-cp311-cp311-manylinux_2_28_aarch64.whl:
Publisher:
python_build_wheel.yaml on ybubnov/torch_geopooling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_geopooling-1.3.0-cp311-cp311-manylinux_2_28_aarch64.whl -
Subject digest:
1ce40b0b36b391605e1e4d0a4fdc8ff5816c3963c316243e8e6e0ead8037b3ab - Sigstore transparency entry: 714261934
- Sigstore integration time:
-
Permalink:
ybubnov/torch_geopooling@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/ybubnov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_build_wheel.yaml@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_geopooling-1.3.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: torch_geopooling-1.3.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 510.7 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
983e2a5a4e0cf37ad253922c8598416d77ab95d9a229590c66ab435fcb29a53e
|
|
| MD5 |
05c017b0c5468b2b8ee1119d12080954
|
|
| BLAKE2b-256 |
7adf81d8ae244a21ddb0c19dbc45684b614110bdea39e9cd1bf522aa62cc55b9
|
Provenance
The following attestation bundles were made for torch_geopooling-1.3.0-cp311-cp311-macosx_11_0_arm64.whl:
Publisher:
python_build_wheel.yaml on ybubnov/torch_geopooling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_geopooling-1.3.0-cp311-cp311-macosx_11_0_arm64.whl -
Subject digest:
983e2a5a4e0cf37ad253922c8598416d77ab95d9a229590c66ab435fcb29a53e - Sigstore transparency entry: 714261855
- Sigstore integration time:
-
Permalink:
ybubnov/torch_geopooling@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/ybubnov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_build_wheel.yaml@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_geopooling-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: torch_geopooling-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c3df63b64f54413547962dc0ad8209c774428d7fc1100f85c62666da64eeb4f
|
|
| MD5 |
32aac45062408fae9a093e04cb031dd4
|
|
| BLAKE2b-256 |
ff7a41ae6b309138cab43afe7b3f382bf0c3e5e75f0ca48116bc991115621c17
|
Provenance
The following attestation bundles were made for torch_geopooling-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl:
Publisher:
python_build_wheel.yaml on ybubnov/torch_geopooling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_geopooling-1.3.0-cp310-cp310-manylinux_2_28_x86_64.whl -
Subject digest:
2c3df63b64f54413547962dc0ad8209c774428d7fc1100f85c62666da64eeb4f - Sigstore transparency entry: 714261870
- Sigstore integration time:
-
Permalink:
ybubnov/torch_geopooling@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/ybubnov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_build_wheel.yaml@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_geopooling-1.3.0-cp310-cp310-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: torch_geopooling-1.3.0-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06089bf3d4ce38635f9b2a74555105295b6c8b53c3cefb031bf4b527b0e8f2dc
|
|
| MD5 |
63d158da22f17c71f1fb67ea0480bec7
|
|
| BLAKE2b-256 |
9158326de8c733c4d6b4b28230bfc74de012a1ae55956e0b3cdb546b7e93e158
|
Provenance
The following attestation bundles were made for torch_geopooling-1.3.0-cp310-cp310-manylinux_2_28_aarch64.whl:
Publisher:
python_build_wheel.yaml on ybubnov/torch_geopooling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_geopooling-1.3.0-cp310-cp310-manylinux_2_28_aarch64.whl -
Subject digest:
06089bf3d4ce38635f9b2a74555105295b6c8b53c3cefb031bf4b527b0e8f2dc - Sigstore transparency entry: 714261898
- Sigstore integration time:
-
Permalink:
ybubnov/torch_geopooling@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/ybubnov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_build_wheel.yaml@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Trigger Event:
push
-
Statement type:
File details
Details for the file torch_geopooling-1.3.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: torch_geopooling-1.3.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 509.7 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c656f27e6fed2dbdbe8fbf32d0a84922a644f8a5927d670464b2e9f17569ac4
|
|
| MD5 |
80a00627a11968178ffc84d2a33abbc6
|
|
| BLAKE2b-256 |
aa341f95c108367a767c876958668cc19bee46f3298e109ef153a14f9efee938
|
Provenance
The following attestation bundles were made for torch_geopooling-1.3.0-cp310-cp310-macosx_11_0_arm64.whl:
Publisher:
python_build_wheel.yaml on ybubnov/torch_geopooling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torch_geopooling-1.3.0-cp310-cp310-macosx_11_0_arm64.whl -
Subject digest:
8c656f27e6fed2dbdbe8fbf32d0a84922a644f8a5927d670464b2e9f17569ac4 - Sigstore transparency entry: 714261834
- Sigstore integration time:
-
Permalink:
ybubnov/torch_geopooling@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/ybubnov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python_build_wheel.yaml@f2b01e330e23c5448eb62b752b573a9f8955bc0b -
Trigger Event:
push
-
Statement type: