forked from jiuyuan/InfiniTensor
Change function name and add dev doc
This commit is contained in:
parent
57954fd523
commit
6d62350631
|
@ -7,7 +7,7 @@ from pyinfinitensor.onnx import OnnxStub, backend
|
|||
import onnx
|
||||
import itertools
|
||||
|
||||
def run_mnist_train_and_infer():
|
||||
def run_cifar_train_and_infer():
|
||||
|
||||
paddle.device.set_device("gpu")
|
||||
|
||||
|
@ -78,4 +78,4 @@ def run_mnist_train_and_infer():
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_mnist_train_and_infer()
|
||||
run_cifar_train_and_infer()
|
|
@ -6,7 +6,7 @@ from pyinfinitensor.onnx import OnnxStub, backend
|
|||
import onnx
|
||||
import itertools
|
||||
|
||||
def run_mnist_train_and_infer():
|
||||
def run_cifar_train_and_infer():
|
||||
|
||||
paddle.device.set_device("gpu")
|
||||
|
||||
|
@ -78,4 +78,4 @@ def run_mnist_train_and_infer():
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_mnist_train_and_infer()
|
||||
run_cifar_train_and_infer()
|
|
@ -0,0 +1,23 @@
|
|||
## Description
|
||||
|
||||
This is a doc to tell you how to run paddle*.py in your machine. If your model run on other machines except Nvidia, you may need to make some change.
|
||||
|
||||
## What do we do in paddle*.py files?
|
||||
|
||||
1. Train model and evalute model with Cifar10 dataset
|
||||
|
||||
2. Export paddle model to onnx model
|
||||
|
||||
3. Load onnx model, nfer with InfiniTensor and
|
||||
|
||||
## Command
|
||||
|
||||
1. Go to `/examples/python` folder
|
||||
|
||||
2. Run the following command
|
||||
|
||||
1. ```
|
||||
python paddle_resnet.py
|
||||
python paddle_densenet.py
|
||||
python paddle_inception.py
|
||||
```
|
|
@ -8,7 +8,7 @@ import onnx
|
|||
import itertools
|
||||
from paddle.vision.models.resnet import BasicBlock
|
||||
|
||||
def run_mnist_train_and_infer():
|
||||
def run_cifar_train_and_infer():
|
||||
|
||||
paddle.device.set_device("gpu")
|
||||
|
||||
|
@ -79,4 +79,4 @@ def run_mnist_train_and_infer():
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_mnist_train_and_infer()
|
||||
run_cifar_train_and_infer()
|
Loading…
Reference in New Issue