Fork自 PaddlePaddle / PaddleOCR
to_variable has been removed in paddle 2.0,using to_tensor instead
删除重复赋值[self.main_loss_type]