def main():

    srnet = nn.SRNET()

    dataset = dman.DataSet()

    sess = tf.compat.v1.InteractiveSession()
    sess.run(tf.compat.v1.global_variables_initializer())
    saver = tf.compat.v1.train.Saver()

    # tfp.training(sess=sess, neuralnet=srnet, saver=saver, dataset=dataset, epochs=FLAGS.epoch, batch_size=FLAGS.batch)
    tfp.validation(sess=sess, neuralnet=srnet, saver=saver, dataset=dataset)
Exemple #2
0
def main():

    dataset = dman.DataSet(setname=FLAGS.setname, tr_ratio=FLAGS.tr_ratio)

    neuralnet = nn.ConvNet(data_dim=dataset.data_dim, channel=dataset.channel, num_class=dataset.num_class, learning_rate=FLAGS.lr)

    sess = tf.InteractiveSession()
    sess.run(tf.global_variables_initializer())
    saver = tf.train.Saver()

    tfp.training(sess=sess, neuralnet=neuralnet, saver=saver, dataset=dataset, epochs=FLAGS.epoch, batch_size=FLAGS.batch, dropout=FLAGS.dropout)
    tfp.validation(sess=sess, neuralnet=neuralnet, saver=saver, dataset=dataset)
def main():

    if (not (torch.cuda.is_available())): FLAGS.ngpu = 0
    device = torch.device("cuda" if (
        torch.cuda.is_available() and FLAGS.ngpu > 0) else "cpu")
    srnet = nn.NeuralNet(device=device, ngpu=FLAGS.ngpu)

    dataset = dman.DataSet()

    solver.training(neuralnet=srnet,
                    dataset=dataset,
                    epochs=FLAGS.epoch,
                    batch_size=FLAGS.batch)
    solver.validation(neuralnet=srnet, dataset=dataset)
Exemple #4
0
def main():

    srnet = nn.SRNET()

    dataset = dman.DataSet()

    sess = tf.InteractiveSession()
    sess.run(tf.global_variables_initializer())
    saver = tf.train.Saver()

    tfp.training(sess=sess,
                 neuralnet=srnet,
                 saver=saver,
                 dataset=dataset,
                 iteration=int(FLAGS.iter),
                 batch_size=FLAGS.batch)
    tfp.validation(sess=sess, neuralnet=srnet, saver=saver, dataset=dataset)
Exemple #5
0
def main():
    training_keys = ['100']
    dataset = dman.DataSet(key_tr=training_keys)
    lstm = nn.LSTM_Model(batch_size=FLAGS.batch, data_dim=dataset.data_dim)

    sess = tf.InteractiveSession()
    sess.run(tf.global_variables_initializer())
    saver = tf.train.Saver()

    tfp.training(sess=sess,
                 neuralnet=lstm,
                 saver=saver,
                 dataset=dataset,
                 batch_size=FLAGS.batch,
                 sequence_length=FLAGS.trainlen,
                 iteration=FLAGS.iter)
    tfp.validation(sess=sess,
                   neuralnet=lstm,
                   saver=saver,
                   dataset=dataset,
                   sequence_length=FLAGS.testlen)