1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#![warn(missing_docs)]
#![allow(clippy::ptr_arg)]
#![allow(clippy::single_match)]
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::approx_constant)]

//! `burn-import` is a crate designed to simplify the process of importing models trained in other
//! machine learning frameworks into the Burn framework. This tool generates a Rust source file that
//! aligns the imported model with Burn's model and converts tensor data into a format compatible with
//! Burn.

#[cfg(any(feature = "pytorch", feature = "onnx"))]
#[macro_use]
extern crate derive_new;

// Enabled when the `pytorch` or `onnx` feature is enabled.
#[cfg(any(feature = "pytorch", feature = "onnx"))]
mod logger;

/// The onnx module.
#[cfg(feature = "onnx")]
pub mod onnx;

/// The module for generating the burn code.
#[cfg(feature = "onnx")]
pub mod burn;

/// The PyTorch module for recorder.
#[cfg(feature = "pytorch")]
pub mod pytorch;

mod formatter;
pub use formatter::*;