crnn.pytorch.tensorrt.chinese icon indicating copy to clipboard operation
crnn.pytorch.tensorrt.chinese copied to clipboard

Transform .wts to .engine的时候报错 权重超出了f16的范围

Open apple2333cream opened this issue 3 years ago • 1 comments

Building engine, please wait for a while... [04/16/2021-10:54:24] [E] [TRT] ../builder/cudnnBuilderWeightConverters.cpp (555) - Misc Error in operator(): 1 (Weights are outside of fp16 range. A possible fix is to retrain the model with regularization to bring the magnitude of the weights down.) [04/16/2021-10:54:24] [E] [TRT] ../builder/cudnnBuilderWeightConverters.cpp (555) - Misc Error in operator(): 1 (Weights are outside of fp16 range. A possible fix is to retrain the model with regularization to bring the magnitude of the weights down.) Build engine successfully! crnn: /home/wzp/project/trt/crnn.pytorch.tensorrt.chinese/crnn_trt/crnn.cpp:294: void APIToModel(unsigned int, nvinfer1::IHostMemory**): Assertion `engine != nullptr' failed. Aborted (core dumped)

image

apple2333cream avatar Apr 16 '21 03:04 apple2333cream

Building engine, please wait for a while... [04/16/2021-10:54:24] [E] [TRT] ../builder/cudnnBuilderWeightConverters.cpp (555) - Misc Error in operator(): 1 (Weights are outside of fp16 range. A possible fix is to retrain the model with regularization to bring the magnitude of the weights down.) [04/16/2021-10:54:24] [E] [TRT] ../builder/cudnnBuilderWeightConverters.cpp (555) - Misc Error in operator(): 1 (Weights are outside of fp16 range. A possible fix is to retrain the model with regularization to bring the magnitude of the weights down.) Build engine successfully! crnn: /home/wzp/project/trt/crnn.pytorch.tensorrt.chinese/crnn_trt/crnn.cpp:294: void APIToModel(unsigned int, nvinfer1::IHostMemory**): Assertion `engine != nullptr' failed. Aborted (core dumped)

image

你有对我原来的模型做什么变动吗?比如模型大小之类的,或者tensorrt的版本不一样? 如果对效率要求不是那么高,可以先尝试把crnn.cpp里的# define USE_FP16注释掉,不转FP16。

ygfrancois avatar Apr 16 '21 05:04 ygfrancois