Add TensorFlow formats to export.py (#4479)
* Initial commit * Remove unused export_torchscript return * ROOT variable * Add prefix to fcn arg * fix ROOT * check_yaml into run() * interim fixes * imgsz=(320, 320) * Hardcode tf_raw_resize False * Finish opt elimination * Update representative_dataset_gen() * Update export.py with TF methods * SiLU and GraphDef fixes * file_size() directory handling feature * export fixes * add lambda: to representative_dataset * Detect training False default * Fuse false for TF models * Embed agnostic NMS arguments * Remove lambda * TensorFlow.js export success * Add pb to Usage * Add *_tfjs_model/ to ignore files * prepend YOLOv5 to function headers * Remove end --- comments * parameterize tfjs export pb file * update run() data default /ROOT * update --include help * update imports * return ct_model * Consolidate TFLite export * pb prerequisite to tfjs * TF modules CamelCase * Remove exports from tf.py and cleanup * pass agnostic NMS arguments * CI * CI * ignore *_web_model/ * Add tensorflow to CI dependencies * CI tensorflow-cpu * Update requirements.txt * Remove tensorflow check_requirement * CI coreml tfjs * export only onnx torchscript * reorder exports torchscript first
This commit is contained in:
1 parent
c47be26f34
commit
c3a93d783d
8 files changed
+359
-322
No files matched your search
@@ -48,7 +48,7 @@ jobs:
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -qr requirements.txt -f https://download.pytorch.org/whl/cpu/torch_stable.html
|
||||
pip install -q onnx onnx-simplifier coremltools # for export
|
||||
pip install -q onnx tensorflow-cpu # for export
|
||||
python --version
|
||||
pip --version
|
||||
pip list
|
||||
@@ -75,6 +75,7 @@ jobs:
|
||||
python val.py --img 128 --batch 16 --weights runs/train/exp/weights/last.pt --device $di
|
||||
|
||||
python hubconf.py # hub
|
||||
python models/yolo.py --cfg ${{ matrix.model }}.yaml # inspect
|
||||
python export.py --img 128 --batch 1 --weights ${{ matrix.model }}.pt --include onnx torchscript # export
|
||||
python models/yolo.py --cfg ${{ matrix.model }}.yaml # build PyTorch model
|
||||
python models/tf.py --weights ${{ matrix.model }}.pt # build TensorFlow model
|
||||
python export.py --img 128 --batch 1 --weights ${{ matrix.model }}.pt --include torchscript onnx # export
|
||||
shell: bash
|
||||
Reference in new issue
Block a user