def load_net(): encoder_param = load_lua( '../../models_anti_multi_level_pyramid_stage_decoder_in/vgg_normalised_conv5_1.t7' ) net_e = encoder(encoder_param) net_d0 = decoder0() net_d0.load_state_dict( torch.load( './trained_models_anti_multi_level/decoder_epoch_5.pth.tar')) net_d1 = decoder1() net_d1.load_state_dict( torch.load( './trained_models_anti_multi_level/decoder_epoch_5.pth.tar')) net_d2 = decoder2() net_d2.load_state_dict( torch.load( './trained_models_anti_multi_level/decoder_epoch_5.pth.tar')) net_d3 = decoder3() net_d3.load_state_dict( torch.load( './trained_models_anti_multi_level/decoder_epoch_5.pth.tar')) net_d4 = decoder4() net_d4.load_state_dict( torch.load( './trained_models_anti_multi_level/decoder_epoch_5.pth.tar')) net_d5 = decoder5() net_d5.load_state_dict( torch.load( './trained_models_anti_multi_level/decoder_epoch_5.pth.tar')) return net_e, net_d0, net_d1, net_d2, net_d3, net_d4, net_d5
def load_net(): encoder_param = load_lua('/mnt/home/xiaoxiang/haozhe/style_nas_2/models/models_photorealistic_nas/vgg_normalised_conv5_1.t7') net_e = encoder(encoder_param) net_d0 = decoder0() net_d0.load_state_dict(torch.load(os.path.join(abs_dir, 'trained_models_nas/decoder_epoch_2.pth.tar'))) net_d1 = decoder1() net_d1.load_state_dict(torch.load(os.path.join(abs_dir, 'trained_models_nas/decoder_epoch_2.pth.tar'))) net_d2 = decoder2() net_d2.load_state_dict(torch.load(os.path.join(abs_dir, 'trained_models_nas/decoder_epoch_2.pth.tar'))) net_d3 = decoder3() net_d3.load_state_dict(torch.load(os.path.join(abs_dir, 'trained_models_nas/decoder_epoch_2.pth.tar'))) net_d4 = decoder4() net_d4.load_state_dict(torch.load(os.path.join(abs_dir, 'trained_models_nas/decoder_epoch_2.pth.tar'))) net_d5 = decoder5() net_d5.load_state_dict(torch.load(os.path.join(abs_dir, 'trained_models_nas/decoder_epoch_2.pth.tar'))) return net_e, net_d0, net_d1, net_d2, net_d3, net_d4, net_d5
def load_net(): encoder_param = load_lua( '/home/zouyj/projects/style_transfer/stylenas/models_photorealistic_nas/vgg_normalised_conv5_1.t7' ) net_e = encoder(encoder_param) net_d0 = decoder0() net_d0.load_state_dict( torch.load( os.path.join(abs_dir, 'trained_models_aaai/decoder_epoch_2.pth.tar'))) net_d1 = decoder1() net_d1.load_state_dict( torch.load( os.path.join(abs_dir, 'trained_models_aaai/decoder_epoch_2.pth.tar'))) net_d2 = decoder2() net_d2.load_state_dict( torch.load( os.path.join(abs_dir, 'trained_models_aaai/decoder_epoch_2.pth.tar'))) net_d3 = decoder3() net_d3.load_state_dict( torch.load( os.path.join(abs_dir, 'trained_models_aaai/decoder_epoch_2.pth.tar'))) net_d4 = decoder4() net_d4.load_state_dict( torch.load( os.path.join(abs_dir, 'trained_models_aaai/decoder_epoch_2.pth.tar'))) net_d5 = decoder5() net_d5.load_state_dict( torch.load( os.path.join(abs_dir, 'trained_models_aaai/decoder_epoch_2.pth.tar'))) return net_e, net_d0, net_d1, net_d2, net_d3, net_d4, net_d5