A package for spherical positional encoding
Project description
Spherical-Implicit-Neural-Representation
A package for spherical implicit neural representations using Herglotz-based positional encoding.
Installation
You can install the package from PyPI:
pip install spherical-inr
Or install the development version locally:
git clone https://github.com/yourusername/spherical_inr.git
cd spherical_inr
pip install -e .
Getting Started
Below is an example of how to instantiate and use the HerglotzNet module:
import torch
import spherical_inr as sph
# Parameters for the HerglotzNet
num_atoms = 16
hidden_layers = 2
hidden_features = 32
out_features = 8
omega0 = 1.0
seed = 42
input_domain = "s2" # Options: "s2", "s1", "r3", "r2"
outermost_linear = True # If False, a sine activation is applied after the last linear layer
# Instantiate the network
model = sph.HerglotzNet(
num_atoms=num_atoms,
hidden_layers=hidden_layers,
hidden_features=hidden_features,
out_features=out_features,
omega0=omega0,
seed=seed,
input_domain=input_domain,
outermost_linear=outermost_linear,
)
# Example input
dummy_input = torch.randn(4, 3)
output = model(dummy_input)
print(output)
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 Distribution
spherical_inr-0.1.4.tar.gz
(6.7 kB
view details)
Built Distribution
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 spherical_inr-0.1.4.tar.gz.
File metadata
- Download URL: spherical_inr-0.1.4.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0644a6ddbe473ad6636034f8aa6a39036b377104175650ce08648069432ed79
|
|
| MD5 |
6a300ea9dbc280d88e17322f6807673e
|
|
| BLAKE2b-256 |
9207b8aa4b07a7810e569c73a4dacd5ea829401de5c397323b528170513a73ca
|
File details
Details for the file spherical_inr-0.1.4-py3-none-any.whl.
File metadata
- Download URL: spherical_inr-0.1.4-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70d0e3f645f8a380b3d90c348ba364ff789b0940b0ad9c27b013a70952d8607d
|
|
| MD5 |
790f380c18bced17cf7eb04c5b3adbee
|
|
| BLAKE2b-256 |
baa7378d17e9cc5a291b1ee38247422d2675e613690565ce1677aed16d11388b
|