ygfrancois / crnn.pytorch.tensorrt.chinese

A Chinese characters recognition repository with tensorrt format supported based on CRNN_Chinese_Characters_Rec and TensorRTx.
16 stars 6 forks source link

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

Open apple2333cream opened 3 years ago

apple2333cream commented 3 years ago

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

ygfrancois commented 3 years ago

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。