Exporting classification trained model to TensorRT

I am trying to export classification model to TensorRT.
My command is

tlt-export resnet_015.tlt -k NHRvZzAwbHFncTk0MXJ0YmwwbXB1bGxhbnU6MjYzNzc2MDctYzQ5MC00NjkxLThkODAtODM0NDc3ZTRhNTNh -o /workspace/tlt-experiments/Classification/Dataset_23_4_2020/resnet50_200px/weights/resnet_025_prune/weights/resnet50_classification.etlt --outputs predictions --export_module classification --cal_data_file /workspace/tlt-experiments/Classification/Dataset_23_4_2020/resnet50_200px/weights/resnet_025_prune/weights/calibration.tensor --batches 120 --cal_batch_size 8 --data_type int8 --cal_cache_file /workspace/tlt-experiments/Classification/Dataset_23_4_2020/resnet50_200px/weights/resnet_025_prune/weights/calibration.bin --experiment_spec /workspace/tlt-experiments/Classification/Dataset_23_4_2020/resnet50_200px/classification_retrain_spec.cfg --max_batch_size 60

But there is error as

 File "/usr/local/bin/tlt-export", line 8, in <module>
    sys.exit(main())
  File "./common/magnet_export.py", line 206, in main
  File "./common/magnet_export.py", line 391, in magnet_export
  File "./faster_rcnn/spec_loader/gen_config_with_spec.py", line 53, in gen_config
  File "./faster_rcnn/spec_loader/spec_loader.py", line 55, in load_experiment_spec
  File "./faster_rcnn/spec_loader/spec_loader.py", line 31, in _load_proto
  File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 693, in Merge
    allow_unknown_field=allow_unknown_field)
  File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 760, in MergeLines
    return parser.MergeLines(lines, message)
  File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 785, in MergeLines
    self._ParseOrMerge(lines, message)
  File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 807, in _ParseOrMerge
    self._MergeField(tokenizer, message)
  File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 899, in _MergeField
    (message_descriptor.full_name, name))
google.protobuf.text_format.ParseError: 1:1 : Message type "Experiment" has no field named "model_config".

My config file has model_config field. The file is attached.
classification_retrain_spec.log (1.1 KB)

Why I have this error?

Your output name is not correct.

--outputs predictions

Please change it to predictions/Softmax

See user guide. https://docs.nvidia.com/metropolis/TLT/tlt-getting-started-guide/index.html#gen_eng_tlt_converter

For classification use: predictions/Softmax
For DetectNet_v2: output_bbox/BiasAdd,output_cov/Sigmoid
For FasterRCNN: dense_class/Softmax,dense_regress/BiasAdd,proposal
For SSD: NMS

Thanks.
This is error

2020-05-04 10:07:55,918 [INFO] /usr/local/lib/python2.7/dist-packages/iva/faster_rcnn/spec_loader/spec_loader.pyc: Loading experiment spec at /workspace/tlt-experiments/Classification/Dataset_23_4_2020/resnet50_200px/classification_retrain_spec.cfg.
Traceback (most recent call last):
File “/usr/local/bin/tlt-export”, line 8, in
sys.exit(main())
File “./common/magnet_export.py”, line 206, in main
File “./common/magnet_export.py”, line 391, in magnet_export
File “./faster_rcnn/spec_loader/gen_config_with_spec.py”, line 53, in gen_config
File “./faster_rcnn/spec_loader/spec_loader.py”, line 55, in load_experiment_spec
File “./faster_rcnn/spec_loader/spec_loader.py”, line 31, in _load_proto
File “/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py”, line 693, in Merge
allow_unknown_field=allow_unknown_field)
File “/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py”, line 760, in MergeLines
return parser.MergeLines(lines, message)
File “/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py”, line 785, in MergeLines
self._ParseOrMerge(lines, message)
File “/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py”, line 807, in _ParseOrMerge
self._MergeField(tokenizer, message)
File “/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py”, line 899, in _MergeField
(message_descriptor.full_name, name))
google.protobuf.text_format.ParseError: 1:1 : Message type “Experiment” has no field named “model_config”.

Why frcnn spec loader is loading classificaiton specs?

My command is as follow trying to export classification model

tlt-export resnet_015.tlt -k NHRvZzAwbHFncTk0MXJ0YmwwbXB1bGxhbnU6MjYzNzc2MDctYzQ5MC00NjkxLThkODAtODM0NDc3ZTRhNTNh -o /workspace/tlt-experiments/Classification/Dataset_23_4_2020/resnet50_200px/weights/resnet_025_prune/weights/resnet50_classification.etlt --outputs predictions/Softmax --export_module classification --cal_data_file /workspace/tlt-experiments/Classification/Dataset_23_4_2020/resnet50_200px/weights/resnet_025_prune/weights/calibration.tensor --batches 120 --cal_batch_size 8 --data_type int8 --cal_cache_file /workspace/tlt-experiments/Classification/Dataset_23_4_2020/resnet50_200px/weights/resnet_025_prune/weights/calibration.bin --experiment_spec /workspace/tlt-experiments/Classification/Dataset_23_4_2020/resnet50_200px/classification_retrain_spec.cfg --max_batch_size 60

Please check your “resnet_015.tlt”.
I saw in your spec,

pretrained_model_path: “/home/itc/NVIDIA-tlt/tlt-experiments/Classification/Dataset_23_4_2020/resnet50_200px/weights/resnet_025_prune/weights/resnet_015.tlt”

How did it generate?

And for classification network, you set 25 epoch. Have you finished the training? The last tlt model should be xxx_025.tlt, right?
Please export this xxx_025.tlt model.

Please refer to the classification jupyter sample to narrow down your problem.
You can try to run the notebook firstly.