Revision fff34406c03ef4d8017c269aaa86ae3448256e2b authored by Gerard Maggiolino on 23 July 2019, 06:23:32 UTC, committed by Gerard Maggiolino on 24 July 2019, 17:48:54 UTC
Changes to fix PyTorch 1.1.0 incompatibilities, add seeding functionality, deleting unused lines. - See issue #42 - Change of attributes and added context manager use in data.load_data and model.Ganomaly.set_input - Removed unused statements and redundant attributes throughout model.Ganomaly - Added previously missing seeding functionality to data loading, model initialization, and training procedure based on opt args.
1 parent 76ea5e4
train.py
"""
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 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()
Computing file changes ...