neuro-orion-v1 / src /inference.py
tgd1115's picture
Upload 12 files
8474315 verified
raw
history blame contribute delete
676 Bytes
from src.config.config import setup_logging
from src.pipeline import NYCDataLoader, VanillaLSTM, Transformer, VAE, AnomalyDetector
def inference():
seq_length = 48
setup_logging()
# Load the preprocessed data
data_loader = NYCDataLoader(batch_size=32)
train_loader, _, test_loader = data_loader.load_data()
# Get the true anomalies
true_anomalies = data_loader.get_true_anomalies()
# Initialize the AnomalyDetector
detector = AnomalyDetector()
# Load the trained models
detector.load_data(test_loader=test_loader)
detector.load_trained_model("transformer_model.pth", model_type="transformer")