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
ModelZoo
pix2pixHD_pytorch
Commits
33c77636
Commit
33c77636
authored
Sep 03, 2024
by
yongshk
Browse files
update
parent
a849873f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
train.py
train.py
+5
-2
No files found.
train.py
View file @
33c77636
...
...
@@ -5,8 +5,11 @@ import torch
from
torch.autograd
import
Variable
from
collections
import
OrderedDict
from
subprocess
import
call
import
fractions
def
lcm
(
a
,
b
):
return
abs
(
a
*
b
)
/
fractions
.
gcd
(
a
,
b
)
if
a
and
b
else
0
# python版本变化修正
# import fractions
# def lcm(a,b): return abs(a * b)/fractions.gcd(a,b) if a and b else 0
import
math
def
lcm
(
a
,
b
):
return
abs
(
a
*
b
)
/
math
.
gcd
(
a
,
b
)
if
a
and
b
else
0
from
options.train_options
import
TrainOptions
from
data.data_loader
import
CreateDataLoader
...
...
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