forked from RForestLiu/ganomaly_s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
train.py
44 lines (35 loc) · 880 Bytes
/
train.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""
TRAIN GANOMALY
. Example: Run the following command from the terminal.
run train.py \
--model ganomaly \
--dataset UCSD_Anomaly_Dataset/UCSDped1 \
--batchsize 32 \
--isize 256 \
--nz 512 \
--ngf 64 \
--ndf 64
"""
##
# LIBRARIES
# from __future__ import print_function
from options import Options
from lib.data import load_data
from lib.model import Ganomaly
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()