You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-33Lines changed: 35 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,55 +25,57 @@ pip install tlx2onnx
25
25
## Usage
26
26
TLX2ONNX can convert models built using TensorLayerX Module Subclass and Layers, and the Layers support list can be found in [Operator list](OP_LIST.md).
27
27
28
+
The following is an example of converting a multi-layer perceptron. You can get the code from [here](https://github.com/tensorlayer/TLX2ONNX/tree/main/tests/test_merge.py).
28
29
```python
29
-
#! /usr/bin/python
30
-
# -*- coding: utf-8 -*-
31
-
30
+
import os
31
+
os.environ["TL_BACKEND"] ='tensorflow'
32
32
import tensorlayerx as tlx
33
33
from tensorlayerx.nn import Module
34
-
from tensorlayerx.nn import Linear, Dropout, Flatten, ReLU6
35
-
from tlx2onnx import export
34
+
from tensorlayerx.nn import Linear, Concat, Elementwise
0 commit comments