MXNet-py27 General Template

Introduction

AI engine: MXNet 1.2.1; Environment: Python 2.7; Input and output mode: undefined mode. Select an appropriate input and output mode based on the model function or application scenario. When using the template to import a model, select the model directory containing the model files.

Template Input

The template input is the MXNet-based model package stored on OBS. Ensure that the OBS directory you use and ModelArts are in the same region. For details about model package requirements, see Model Package Example.

Input and Output Mode

Undefined Mode can be overwritten. That is, you can select another input and output mode during model creation.

Model Package Specifications

Model Package Example

Structure of the MXNet-based model package

When publishing the model, you only need to specify the model directory.

OBS bucket/directory name
|── model    (Mandatory) The folder must be named model and is used to store model-related files.
    ├── <<Custom Python package>>       (Optional) User's Python package, which can be directly referenced in the model inference code
    ├── resnet-50-symbol.json    (Mandatory) Model definition file, which contains the neural network description of the model
    ├── resnet-50-0000.params    (Mandatory) Model variable parameter file, which contains parameter and weight information
    ├──customize_service.py      (Optional) Model inference code file. The file must be named customize_service.py. Only one inference code file exists. The .py file on which customize_service.py depends can be directly put in the model directory.