Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
57f01253
Unverified
Commit
57f01253
authored
Dec 18, 2021
by
MissPenguin
Committed by
GitHub
Dec 18, 2021
Browse files
Merge pull request #4965 from LDOUBLEV/sdmgr
fix train
parents
5e2d0774
3312d624
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
tools/program.py
tools/program.py
+2
-4
No files found.
tools/program.py
View file @
57f01253
...
...
@@ -227,10 +227,6 @@ def train(config,
images
=
batch
[
0
]
if
use_srn
:
model_average
=
True
if
model_type
==
'table'
or
extra_input
:
preds
=
model
(
images
,
data
=
batch
[
1
:])
if
model_type
==
"kie"
:
preds
=
model
(
batch
)
train_start
=
time
.
time
()
# use amp
...
...
@@ -243,6 +239,8 @@ def train(config,
else
:
if
model_type
==
'table'
or
extra_input
:
preds
=
model
(
images
,
data
=
batch
[
1
:])
elif
model_type
==
"kie"
:
preds
=
model
(
batch
)
else
:
preds
=
model
(
images
)
loss
=
loss_class
(
preds
,
batch
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment