Giter VIP home page Giter VIP logo

Comments (3)

tommy-qichang avatar tommy-qichang commented on September 15, 2024

Please provide the error msg and the command?

from asyndgan.

shikangouyang avatar shikangouyang commented on September 15, 2024

python save_syn.py --dataroot /home/OYSK/codes/AsynDGAN/test_demo --name AtoB --model asyndgan --netG resnet_9blocks --direction AtoB --dataset_mode brats --results_dir results/test_asyndgan
----------------- End -------------------
build key:0
dataset [BratsDataset] was created
opt.netG:resnet_9blocks
initialize network with normal
model [AsyndganModel] was created
Namespace(aspect_ratio=1.0, batch_size=1, checkpoints_dir='./checkpoints', crop_size=256, dataroot='/home/OYSK/codes/AsynDGAN/test_demo', dataset_mode='brats', direction='AtoB', display_id=-1, display_winsize=256, epoch='latest', eval=False, gpu_ids=[0], init_gain=0.02, init_type='normal', input_nc=3, isTrain=False, load_iter=0, load_size=256, max_dataset_size=inf, model='asyndgan', n_layers_D=3, name='AtoB', ndf=64, netD='basic', netG='resnet_9blocks', ngf=64, no_dropout=False, no_flip=True, norm='batch', ntest=inf, num_test=inf, num_threads=0, output_nc=3, phase='test', preprocess='resize_and_crop', results_dir='results/test_asyndgan', serial_batches=True, suffix='', verbose=False)
loading the model from ./checkpoints/AtoB/latest_net_G.pth
---------- Networks initialized -------------
[Network G] Total number of parameters : 11.383 M
Traceback (most recent call last):
File "save_syn.py", line 115, in
model.set_input(data) # unpack data from data loader
File "/home/OYSK/codes/AsynDGAN/models/asyndgan_model.py", line 116, in set_input
self.real_A.append(input['A_' + str(i)].to(self.device))
KeyError: 'A_0'

python save_syn.py --dataroot /home/OYSK/codes/AsynDGAN/test --name AtoB --model asyndgan --netG resnet_9blocks --direction AtoB --dataset_mode brats_split --results_dir results/test_asyndgan
----------------- End -------------------
Load: BraTS18_tumor_size_0.h5
build key:0
Load: BraTS18_tumor_size_1.h5
build key:0
Load: BraTS18_tumor_size_2.h5
build key:0
dataset [BratsSplitDataset] was created
opt.netG:resnet_9blocks
initialize network with normal
model [AsyndganModel] was created
Namespace(aspect_ratio=1.0, batch_size=1, checkpoints_dir='./checkpoints', crop_size=256, dataroot='/home/OYSK/codes/AsynDGAN/test', dataset_mode='brats_split', direction='AtoB', display_id=-1, display_winsize=256, epoch='latest', eval=False, gpu_ids=[0], init_gain=0.02, init_type='normal', input_nc=3, isTrain=False, load_iter=0, load_size=256, max_dataset_size=inf, model='asyndgan', n_layers_D=3, name='AtoB', ndf=64, netD='basic', netG='resnet_9blocks', ngf=64, no_dropout=False, no_flip=True, norm='batch', ntest=inf, num_test=inf, num_threads=0, output_nc=3, phase='test', preprocess='resize_and_crop', results_dir='results/test_asyndgan', serial_batches=True, suffix='', verbose=False)
loading the model from ./checkpoints/AtoB/latest_net_G.pth
---------- Networks initialized -------------
[Network G] Total number of parameters : 11.383 M

Traceback (most recent call last):
File "save_syn.py", line 119, in
gt = data['Seg']
KeyError: 'Seg'

When testing, input a picture or label, and then generate another picture. I am weak, sorry. Hope you can give more guidance

from asyndgan.

tommy-qichang avatar tommy-qichang commented on September 15, 2024

Sorry for my late response. But it seems when you evaluating, you should directly use the pix2pix model rather than use asyndgan model since the evaluation stage should just use the central generator.

from asyndgan.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.