Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
221cb0249
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
221cb0249
Commits
aca98aac
Unverified
Commit
aca98aac
authored
Sep 1, 2022
by
i-robot
Committed by
Gitee
Sep 1, 2022
Browse files
Options
Downloads
Plain Diff
!3506 [textrcnn] change seed to fix accuracy issue
Merge pull request !3506 from xubangduo/fixtextrcnn
parents
a138fcc1
10b3ebb8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
research/nlp/textrcnn/modelarts/start.py
+2
-2
2 additions, 2 deletions
research/nlp/textrcnn/modelarts/start.py
research/nlp/textrcnn/train.py
+2
-2
2 additions, 2 deletions
research/nlp/textrcnn/train.py
with
4 additions
and
4 deletions
research/nlp/textrcnn/modelarts/start.py
+
2
−
2
View file @
aca98aac
# 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__
))))
...
...
This diff is collapsed.
Click to expand it.
research/nlp/textrcnn/train.py
+
2
−
2
View file @
aca98aac
# 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
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment