TypeError: coercing to Unicode: need string or buffer, NoneType found

I have trained a model using TLT Retinanet with backbone resnet18

When i tried to export i got following error

tlt-export retinanet -m resnet18_result/weights/retinanet_resnet_epoch_060.tlt -o 'exported_model.etlt'
-k abcd
Using TensorFlow backend.
Traceback (most recent call last):
  File "/usr/local/bin/tlt-export", line 8, in <module>
    sys.exit(main())
  File "./common/export/app.py", line 219, in main
  File "./common/export/app.py", line 153, in build_exporter
  File "./retinanet/export/exporter.py", line 57, in __init__
  File "/usr/lib/python2.7/genericpath.py", line 37, in isfile
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found

I solved the error . I just added the spec file into the tlt-export command… Please add this into the doc. Please add --e flag into tlt-export command

eg:

tlt-export retinanet -e spec.txt -m -k

Please add the -e flag into tlt-export command in docs or solve the error internally

Moving this topic into TLT forum and also asking internal team to improve the doc.

This error is only while exporting a detection model… Classification models is exported without adding -e flag.

BTW, detectnet_v2 is also not needed for “-e” flag.

Below detection networks need the flag.
ssd, dssd, retinanet, yolo, faster-rcnn

1 Like