Introducing MoXing Framework
Before using MoXing Framework, you need to introduce the MoXing Framework module at the beginning of the code.
Introducing MoXing Framework
Run the following code to import the MoXing module:
1 |
import moxing as mox
|
After the MoXing module is introduced, all functions of MoXing Framework are covered. For example, in the following code, mox covers all APIs under moxing.tensorflow and moxing.framework:
1 |
import moxing.tensorflow as mox
|
Related Notes
After the MoXing module is introduced, the standard logging module of Python is set to the INFO level, and the version number is printed. You can use the following API to reset the logging level:
1 2 3 4 |
import logging
from moxing.framework.util import runtime
runtime.reset_logger(level=logging.WARNING)
|
Before introducing MoXing, you can set the MOX_SILENT_MODE environment variable to 1 to prevent MoXing from printing the version number. Use the following Python code to configure the environment variable. You need to configure the environment variables before importing MoXing.
1 2 3 |
import os
os.environ['MOX_SILENT_MODE'] = '1'
import moxing as mox
|
Last Article: Getting Started
Next Article: Mapping Between mox.file and Local APIs and Switchover
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.