Skip to content
Snippets Groups Projects
Unverified Commit aca98aac authored by i-robot's avatar i-robot Committed by Gitee
Browse files

!3506 [textrcnn] change seed to fix accuracy issue

Merge pull request !3506 from xubangduo/fixtextrcnn
parents a138fcc1 10b3ebb8
Branches
No related tags found
No related merge requests found
# Copyright 2021 Huawei Technologies Co., Ltd # Copyright 2021-2022 Huawei Technologies Co., Ltd
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -38,7 +38,7 @@ from src.model_utils.moxing_adapter import moxing_wrapper ...@@ -38,7 +38,7 @@ from src.model_utils.moxing_adapter import moxing_wrapper
from src.model_utils.config import config as cfg from src.model_utils.config import config as cfg
from src.model_utils.device_adapter import get_device_id from src.model_utils.device_adapter import get_device_id
set_seed(0) set_seed(2)
os.system("pip3 install gensim==4.0.1 python-Levenshtein urllib3==1.26.5 chardet==3.0.4") os.system("pip3 install gensim==4.0.1 python-Levenshtein urllib3==1.26.5 chardet==3.0.4")
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
......
# Copyright 2020 Huawei Technologies Co., Ltd # Copyright 2020-2022 Huawei Technologies Co., Ltd
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -34,7 +34,7 @@ from src.model_utils.moxing_adapter import moxing_wrapper ...@@ -34,7 +34,7 @@ from src.model_utils.moxing_adapter import moxing_wrapper
from src.model_utils.config import config as cfg from src.model_utils.config import config as cfg
from src.model_utils.device_adapter import get_device_id from src.model_utils.device_adapter import get_device_id
set_seed(0) set_seed(2)
def modelarts_pre_process(): def modelarts_pre_process():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment