| load_DNN | R Documentation |
Loads the Pre-Trained Deep Neural Network (DNN) from the DNN.onnx.
The function uses the reticulate package to import the onnxruntime Python library
and create an inference session for the model.
load_DNN()
An ONNX runtime inference session object for the DNN model.
Note that Python and the libraries numpy and onnxruntime are required.
First, please ensure that Python is installed on your computer and that Python is included in the system's PATH environment variable. If not, please download and install it from the official website (https://www.python.org/).
If you encounter an error when running this function stating that the numpy and onnxruntime
modules are missing:
Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named 'numpy'
or
Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named 'onnxruntime'
this means that the numpy or onnxruntime library is missing from your Python environment. If you are using Windows or macOS,
please run the command pip install numpy or pip install onnxruntime in Command Prompt or Windows PowerShell (Windows), or Terminal (macOS).
If you are using Linux, please ensure that pip is installed and use the command pip install numpy or
pip install onnxruntime to install the missing libraries.
DNN_predictor
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.