mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
[Fix] Fix mmengine dump of tversky ut in dev-1.x (#2001)
This commit is contained in:
parent
ee7f340dff
commit
8ce7055d1a
@ -36,11 +36,12 @@ def test_tversky_lose():
|
|||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import mmcv
|
import mmengine
|
||||||
import numpy as np
|
import numpy as np
|
||||||
tmp_file = tempfile.NamedTemporaryFile()
|
tmp_file = tempfile.NamedTemporaryFile()
|
||||||
|
|
||||||
mmcv.dump([1.0, 2.0, 3.0], f'{tmp_file.name}.pkl', 'pkl') # from pkl file
|
mmengine.dump([1.0, 2.0, 3.0], f'{tmp_file.name}.pkl',
|
||||||
|
'pkl') # from pkl file
|
||||||
loss_cfg = dict(
|
loss_cfg = dict(
|
||||||
type='TverskyLoss',
|
type='TverskyLoss',
|
||||||
class_weight=f'{tmp_file.name}.pkl',
|
class_weight=f'{tmp_file.name}.pkl',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user