Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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"]()]] #4

Open
tongxuezhou opened this issue Dec 14, 2018 · 6 comments

Comments

@tongxuezhou
Copy link

No description provided.

@arnab39
Copy link
Owner

arnab39 commented Dec 14, 2018

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.

@tongxuezhou
Copy link
Author

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

@tongxuezhou
Copy link
Author

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

@hassaanmahmood
Copy link

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
Copy link

hassaanmahmood commented Mar 18, 2019

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):

@hrmello
Copy link

hrmello commented May 5, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants