https://github.com/samet-akcay/ganomaly
Raw File
Tip revision: d2955c1fe4ba9d498b3e91d5d831de38bbad508c authored by dependabot[bot] on 07 February 2023, 22:37:19 UTC
Bump cryptography from 2.7 to 39.0.1
Tip revision: d2955c1
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 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()
back to top