ThomasDelteil commented on a change in pull request #12419: [MXNET-580] [WIP] Add SN-GAN example URL: https://github.com/apache/incubator-mxnet/pull/12419#discussion_r216786068
########## File path: example/gluon/sn-gan/train.py ########## @@ -0,0 +1,149 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# This example is inspired by https://github.com/jason71995/Keras-GAN-Library, +# https://github.com/kazizzad/DCGAN-Gluon-MxNet/blob/master/MxnetDCGAN.ipynb +# https://github.com/apache/incubator-mxnet/blob/master/example/gluon/dcgan.py + + +import os +import random +import logging +import argparse + +from data import get_training_data +from model import get_generator, get_descriptor +from utils import save_image + +import mxnet as mx +from mxnet import nd, autograd +from mxnet import gluon + +# CLI +parser = argparse.ArgumentParser( + description='train a model for Spectral Normalization GAN.') +parser.add_argument('--data-path', type=str, default='./data', + help='path of data.') +parser.add_argument('--batch-size', type=int, default=64, + help='training batch size. default is 64.') +parser.add_argument('--epochs', type=int, default=100, + help='number of training epochs. default is 100.') +parser.add_argument('--lr', type=float, default=0.0001, + help='learning rate. default is 0.0001.') +parser.add_argument('--lr-beta', type=float, default=0.5, + help='learning rate for the beta in margin based loss. default is 0.5s.') Review comment: 0.5s ? what does `s` stand for here? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
