mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-11-03 11:19:20 +00:00
Update det_basic_loss.py
to_variable has been removed in paddle 2.0,using to_tensor instead
This commit is contained in:
parent
a2fb623feb
commit
4a8fc9176d
@ -200,6 +200,6 @@ def ohem_batch(scores, gt_texts, training_masks, ohem_ratio):
|
|||||||
i, :, :], ohem_ratio))
|
i, :, :], ohem_ratio))
|
||||||
|
|
||||||
selected_masks = np.concatenate(selected_masks, 0)
|
selected_masks = np.concatenate(selected_masks, 0)
|
||||||
selected_masks = paddle.to_variable(selected_masks)
|
selected_masks = paddle.to_tensor(selected_masks)
|
||||||
|
|
||||||
return selected_masks
|
return selected_masks
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user