Skip to content

Commit

Permalink
refactoring. encapsulate train()
Browse files Browse the repository at this point in the history
  • Loading branch information
samet-akcay committed Aug 12, 2019
1 parent 63be7f4 commit e6b08d1
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,22 @@
from lib.model import Ganomaly

##
# def main():
""" Training
"""

##
# ARGUMENTS
opt = Options().parse()

##
# LOAD DATA
dataloader = load_data(opt)

##
# LOAD MODEL
model = Ganomaly(opt, dataloader)

##
# TRAIN MODEL
model.train()

# if __name__ == '__main__':
# main()
def train():
""" Training
"""

##
# ARGUMENTS
opt = Options().parse()
##
# LOAD DATA
dataloader = load_data(opt)
##
# LOAD MODEL
model = Ganomaly(opt, dataloader)
##
# TRAIN MODEL
model.train()

if __name__ == '__main__':
train()

0 comments on commit e6b08d1

Please sign in to comment.