Downloads · 30 days
0
bamfai/desi-spectral-anomaly-detector
desi-spectral-anomaly-detector is a machine learning model from bamfai. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
PyTorch autoencoder for detecting spectrally unusual objects in DESI survey data.
Downloads · 30 days
0
Access
Public
Updated Mar 25, 2026
Repo size
5.3 MB
Likes
0
Public
Click a slice to open those files.
.pt5.3 MB · 99%
From the Hugging Face model README
PyTorch autoencoder for detecting spectrally unusual objects in DESI survey data.
import torch
class SpectralAE(torch.nn.Module):
def __init__(self, n_in=496, n_lat=64):
super().__init__()
self.enc = torch.nn.Sequential(
torch.nn.Linear(n_in, 256), torch.nn.BatchNorm1d(256), torch.nn.ReLU(), torch.nn.Dropout(0.1),
torch.nn.Linear(256, 128), torch.nn.ReLU(),
torch.nn.Linear(128, n_lat))
self.dec = torch.nn.Sequential(
torch.nn.Linear(n_lat, 128), torch.nn.ReLU(),
torch.nn.Linear(128, 256), torch.nn.BatchNorm1d(256), torch.nn.ReLU(), torch.nn.Dropout(0.1),
torch.nn.Linear(256, n_in))
def forward(self, x): return self.dec(self.enc(x))
model = SpectralAE()
model.load_state_dict(torch.load("autoencoder_model.pt"))
model.eval()