Skip to main content

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


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.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spherical_inr-0.1.3-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file spherical_inr-0.1.3.tar.gz.

File metadata

  • Download URL: spherical_inr-0.1.3.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for spherical_inr-0.1.3.tar.gz
Algorithm Hash digest
SHA256 58543f2189d7948476c0635d3303ad9029969f22bf5a580084c0283abf073352
MD5 52a6007e88c58a5b2b3ec1e91e8c251c
BLAKE2b-256 1497f8288b3e9e237dbecdb223c977b78a8159e45a0b474cabf180295de01ffa

See more details on using hashes here.

File details

Details for the file spherical_inr-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: spherical_inr-0.1.3-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.11.8

File hashes

Hashes for spherical_inr-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d2fea4ddde364a0109774927a4e5976bb65f4d89bbc3423960e8f9d5e20fb7da
MD5 661c7559ccbad0b3c1fd6f33a3672532
BLAKE2b-256 9ba7132797527b876dfc38ec822796d91108d4d0f9760e8610440dcd1fdc22e1

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