FewShot_GAN-Unet3D icon indicating copy to clipboard operation
FewShot_GAN-Unet3D copied to clipboard

when I 'run main.py --testing' have some errors FailedPreconditionError (see above for traceback): Attempting to use uninitialized value D/d_up3_deconv/g [[node D/d_up3_deconv/g/read (defined at ../lib/operations.py:87) = Identity[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"](D/d_up3_deconv/g)]] [[{{node ArgMax/_3}} = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_491_ArgMax", tensor_type=DT_INT64, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

Open tongxuezhou opened this issue 6 years ago • 6 comments

tongxuezhou avatar Dec 14 '18 19:12 tongxuezhou

Hi, Firstly, I would request you not to open a new issue everytime you face a problem. You can continue posting on the same issue with new comments. Also please put specific title and under it post your entire error message which helps to keep the issues section clean. I will soon get back to you with your problem.

arnab39 avatar Dec 14 '18 19:12 arnab39

@arnab39 thanks for your reminding, I'm new to use github, I'll follow that.

tongxuezhou avatar Dec 15 '18 08:12 tongxuezhou

@arnab39 hi, did you check the problem? looking forward to your reply~

tongxuezhou avatar Dec 17 '18 09:12 tongxuezhou

I am also getting same error in python main_unet.py --testing . Resolved it with sess.run(tf.global_variables_initializer()) now getting out of memory error. trying to fix it using GPU allocation. or any guidance how to solve it?

hassaanmahmood avatar Mar 18 '19 02:03 hassaanmahmood

I am also getting same error in python main_unet.py --testing . Resolved it with sess.run(tf.global_variables_initializer()) now getting out of memory error. trying to fix it using GPU allocation. or any guidance how to solve it?

I solved this issue by `

 with tf.device('/device:GPU:2'):

     with tf.variable_scope('U') as scope:`

in def trained_network_dis(patch, reuse=False):

hassaanmahmood avatar Mar 18 '19 04:03 hassaanmahmood

I solved this issue by changing the following in test.py: In, def test, write

    # To load the saved checkpoint
    saver = tf.train.Saver()
    with tf.Session() as sess:
      sess.run(tf.global_variables_initializer()) #added line to make testing work
      try:
        load_model(F.best_checkpoint_dir, sess, saver)
        print(" Checkpoint loaded succesfully!....\n")
      except:
        print(" [!] Checkpoint loading failed!....\n")
        return

hrmello avatar May 05 '19 22:05 hrmello