Views
No views yet
1import joblib
2import torch
3import numpy as np
4from my_nn_model import StellarNN # Replace with actual neural network module
5
6# Load CatBoost model
7catboost_model = joblib.load("Allanatrix/catboost_model.pkl")
8
9# Load PyTorch neural network model
10nn_model = StellarNN()
11nn_model.load_state_dict(torch.load("Allanatrix/stellar_nn.pt"))
12nn_model.eval()
13
14# Example prediction with SDSS features
15features = np.array([...]) # SDSS input features (e.g., magnitudes, spectral data)
16catboost_out = catboost_model.predict(features)
17refined_pred = nn_model(torch.tensor(catboost_out).float())