Skip to main content

Crate xlog_neural

Crate xlog_neural 

Source
Expand description

Neural network integration for XLOG probabilistic logic programs.

This crate provides the infrastructure for integrating PyTorch neural networks with XLOG’s probabilistic inference engine, following the DeepProbLog paradigm.

§Architecture

The neural integration consists of:

  • NetworkRegistry: Central registry managing all neural networks
  • NetworkHandle: Holds PyTorch module, optimizer, and configuration
  • NetworkConfig: Configuration options for network behavior

§Features

  • python - Enable Python interop via PyO3. Required for actual PyTorch integration.

§Example

use xlog_neural::{NetworkRegistry, NetworkConfig};

let mut registry = NetworkRegistry::new();
registry.register(NetworkConfig::default("mnist_net"));

// Set all networks to training mode
registry.set_train_mode(true);

Re-exports§

pub use batch::BatchCollector;
pub use batch::BatchMapping;
pub use batch::BatchResult;
pub use batch::NeuralCall;
pub use bridge::ADProbability;
pub use bridge::CircuitLeaf;
pub use bridge::NeuralBridge;
pub use bridge::NeuralOutput;
pub use handle::EmbeddingHandle;
pub use handle::NetworkHandle;
pub use registry::NetworkConfig;
pub use registry::NetworkRegistry;
pub use tensor_source::TensorMetadata;
pub use tensor_source::TensorSourceError;
pub use tensor_source::TensorSourceRegistry;
pub use pyo3;

Modules§

batch
Batched Neural Evaluation
bridge
Neural → Probability Bridge
handle
Network handle for managing PyTorch modules.
registry
Network registry for managing registered neural networks.
tensor_source
Tensor Source Registry

Enums§

NeuralError
Error types for neural network operations

Type Aliases§

NeuralResult
Result type for neural operations