Recursive-Cascaded-Networks icon indicating copy to clipboard operation
Recursive-Cascaded-Networks copied to clipboard

No default session is registered. Use `with sess.as_default():` or pass an explicit session to `run(session=sess)`

Open Hoodini-Gzj opened this issue 4 years ago • 2 comments

hello,while I was running your code, there was a problem: Traceback (most recent call last): File "eval.py", line 147, in main() File "eval.py", line 82, in main tf.global_variables_initializer().run() File "E:\anaconda3\envs\R\lib\site-packages\tensorflow\python\framework\ops.py", line 2450, in run _run_using_default_session(self, feed_dict, self.graph, session) File "E:\anaconda3\envs\R\lib\site-packages\tensorflow\python\framework\ops.py", line 5202, in _run_using_default_session raise ValueError("Cannot execute operation using run(): No default " ValueError: Cannot execute operation using run(): No default session is registered. Use with sess.as_default(): or pass an explicit session to run(session=sess) Could you give me some advice about this error please,looking forward to your reply.

Hoodini-Gzj avatar Oct 25 '21 06:10 Hoodini-Gzj

This code only supports tf 1.4.

zsyzzsoft avatar Oct 26 '21 14:10 zsyzzsoft

Thank you for your patient reply before.Your advice is helpful to me.I succeeded in getting the test results, but I wanted to get the deformation field and the warped image.Is that right to replace keys = ['pt_mask', 'landmark_dists', 'jaccs', 'dices', 'jacobian_det', ] in eval.py with keys = ['real_flow', 'image_fixed', 'warped_moving']? Are there any specific changes that need to be made elsewhere?

Hoodini-Gzj avatar Nov 16 '21 03:11 Hoodini-Gzj