コード例 #1
0
def test():
    datamanager = CT('CT_seq', train_ratio=0.8, expand_dim=3, seed=0)
    autoencoder = AutoEncoder(2, 128, 'AE')
    trainer = Trainer(64, datamanager, autoencoder, version='cnn', save_path='save/cnn_ae/cnn/', gpu='2')
    trainer.train(301) # 
    # trainer.load_model()
    trainer.cal_loss()
コード例 #2
0
def gru_test():
    datamanager = CT('CT_seq', train_ratio=0.8, expand_dim=None, seed=0)
    autoencoder = AutoEncoder(2, 64, 'gru', [128], [128], 'AE')
    trainer = Trainer(64, datamanager, autoencoder, version='test', save_path='save/rnn_ae/gru/', gpu='1')
    # trainer.train(301)
    trainer.load_model()
    trainer.cal_loss()
コード例 #3
0
def lstm_test():
    datamanager = CT('CT_seq', train_ratio=0.8, expand_dim=3, seed=0)
    autoencoder = AutoEncoder(2, 64, 'lstm', [128], [128], 'AE')
    trainer = Trainer(64,
                      datamanager,
                      autoencoder,
                      version='vae',
                      save_path='save/crnn_vae/lstm/',
                      gpu='1')
    trainer.train(301)
コード例 #4
0
def rnn_test():
    datamanager = CT('CT_seq', train_ratio=0.8, expand_dim=None, seed=0)
    autoencoder = AutoEncoder(2, 64, 'rnn', [128], [128], 'AE')
    trainer = Trainer(64,
                      datamanager,
                      autoencoder,
                      version='vae',
                      save_path='save/rnn_vae/rnn/',
                      gpu='0')
    trainer.train(301)
コード例 #5
0
def lstm_test():
    datamanager = CT('CT_seq', train_ratio=0.8, expand_dim=3, seed=0)
    autoencoder = AutoEncoder(2, 64, 'lstm', [128], [128], 'AE')
    trainer = Trainer(64,
                      datamanager,
                      autoencoder,
                      version='lstm',
                      save_path='save/resrnn_ae/lstm/',
                      gpu='2')
    trainer.train(301)  #
    # trainer.load_model()
    trainer.cal_loss()