Comments (5)
Please try pip install tflearn==0.3.2
from recursive-cascaded-networks.
Are there GPUs on the machine? Did you install tensorflow-gpu
or tensorflow
?
from recursive-cascaded-networks.
Hi @zsyzzsoft ,
I run it on cluster and I can have an option with gpu and without gpu.
Finally I mananed to run it properly.
Thank You so much for your help !!
Thank You @zsyzzsoft :)
from recursive-cascaded-networks.
Hi @zsyzzsoft,
I updated tflearn==0.3.2
But I am still getting an error :
`{'base_network': 'VTN', 'n_cascades': 3, 'rep': 1, 'gpu': '0,1,2,3', 'checkpoint': None, 'dataset': 'datasets/liver.json', 'batch': 4, 'round': 20000, 'epochs': 5, 'debug': False, 'val_steps': 100, 'net_args': '', 'data_args': '', 'lr': 0.0001, 'clear_steps': False, 'finetune': None, 'name': None, 'logs': ''}
[(<network.base_networks.VTNAffineStem object at 0x2aab0adfcb00>, {'raw_weight': 0, 'reg_weight': 0, 'weight': 1}), (<network.base_networks.VTN object at 0x2aab0adcdf60>, {'raw_weight': 0, 'weight': 1, 'reg_weight': 1}), (<network.base_networks.VTN object at 0x2aab0b17feb8>, {'raw_weight': 0, 'weight': 1, 'reg_weight': 1}), (<network.base_networks.VTN object at 0x2aab0b1f5da0>, {'raw_weight': 1, 'weight': 1, 'reg_weight': 1})]
Graph built
Traceback (most recent call last):
File "/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1323, in _do_call
return fn(*args)
File "/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1293, in _run_fn
self._extend_graph()
File "/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1354, in _extend_graph
self._session, graph_def.SerializeToString(), status)
File "/.local/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation 'gaffdfrm/deform_stem_2/upsamp1to0/W': Operation was explicitly assigned to /gpu:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.
[[Node: gaffdfrm/deform_stem_2/upsamp1to0/W = VariableV2_class=["loc:@gaffdfrm/deform_stem_2/upsamp1to0/W"], container="", dtype=DT_FLOAT, shape=[4,4,4,3,35], shared_name="", _device="/gpu:0"]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "demo.py", line 285, in
main()
File "demo.py", line 93, in main
saver.restore(sess, checkpoint)
File "/.local/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1666, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1120, in _run
feed_dict_tensor, options, run_metadata)
File "/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1317, in _do_run
options, run_metadata)
File "/.local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1336, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation 'gaffdfrm/deform_stem_2/upsamp1to0/W': Operation was explicitly assigned to /gpu:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.
[[Node: gaffdfrm/deform_stem_2/upsamp1to0/W = VariableV2_class=["loc:@gaffdfrm/deform_stem_2/upsamp1to0/W"], container="", dtype=DT_FLOAT, shape=[4,4,4,3,35], shared_name="", _device="/gpu:0"]]
Caused by op 'gaffdfrm/deform_stem_2/upsamp1to0/W', defined at:
File "demo.py", line 285, in
main()
File "demo.py", line 85, in main
fast_reconstruction=args.fast_reconstruction, validation=True)
File "/dev/reg3/Recursive-Cascaded-Networks/network/framework.py", line 98, in init
self.predictions = gpus(self.network, net_pls)
File "Agata/dev/reg3/Recursive-Cascaded-Networks/network/utils.py", line 151, in call
result = net(*[arg[i] for arg in args])
File "/Agata/dev/reg3/Recursive-Cascaded-Networks/network/utils.py", line 108, in call
return self.build(*args, **kwargs)
File "/Agata/dev/reg3/Recursive-Cascaded-Networks/network/recursive_cascaded_networks.py", line 87, in build
stem_result = stem(img1, stem_results[-1]['warped'])
File "/Agata/dev/reg3/Recursive-Cascaded-Networks/network/utils.py", line 108, in call
return self.build(*args, **kwargs)
File "/Agata/dev/reg3/Recursive-Cascaded-Networks/network/base_networks.py", line 120, in build
pred0 = upconvolve('upsamp1to0', concat1, dims, 4, 2, shape0[1:4])
File "/Agata/dev/reg3/Recursive-Cascaded-Networks/network/base_networks.py", line 30, in upconvolve
padding='same', activation='linear', bias=False, scope=opName, reuse=reuse, weights_init=weights_init)
File "/.local/lib/python3.6/site-packages/tflearn/layers/conv.py", line 1147, in conv_3d_transpose
trainable=trainable, restore=restore)
File "/.local/lib/python3.6/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 181, in func_with_args
return func(*args, **current_args)
File "/.local/lib/python3.6/site-packages/tflearn/variables.py", line 65, in variable
validate_shape=validate_shape)
File "/.local/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 1203, in get_variable
constraint=constraint)
File "/.local/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 1092, in get_variable
constraint=constraint)
File "/.local/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 425, in get_variable
constraint=constraint)
File "/.local/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 394, in _true_getter
use_resource=use_resource, constraint=constraint)
File "/pstore/home/krasona/.local/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 805, in _get_single_variable
constraint=constraint)
File "/.local/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 213, in init
constraint=constraint)
File "/.local/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 309, in _init_from_args
name=name)
File "/.local/lib/python3.6/site-packages/tensorflow/python/ops/state_ops.py", line 133, in variable_op_v2
shared_name=shared_name)
File "/.local/lib/python3.6/site-packages/tensorflow/python/ops/gen_state_ops.py", line 927, in _variable_v2
shared_name=shared_name, name=name)
File "/.local/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2956, in create_op
op_def=op_def)
File "/.local/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1470, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
InvalidArgumentError (see above for traceback): Cannot assign a device for operation 'gaffdfrm/deform_stem_2/upsamp1to0/W': Operation was explicitly assigned to /gpu:0 but available devices are [ /job:localhost/replica:0/task:0/device:CPU:0 ]. Make sure the device specification refers to a valid device.
[[Node: gaffdfrm/deform_stem_2/upsamp1to0/W = VariableV2_class=["loc:@gaffdfrm/deform_stem_2/upsamp1to0/W"], container="", dtype=DT_FLOAT, shape=[4,4,4,3,35], shared_name="", _device="/gpu:0"]]
`
from recursive-cascaded-networks.
Hi @zsyzzsoft ,
I run it on cluster and I can have an option with gpu and without gpu. Finally I mananed to run it properly. Thank You so much for your help !! Thank You @zsyzzsoft :)
I'm in the same situation as you. How did you solve it?Looking forward to your reply
from recursive-cascaded-networks.
Related Issues (20)
- loss function HOT 1
- question about the subnetwork VTNAffine HOT 1
- Training stops abruptly on colab
- A question about flow filed HOT 1
- Problems about the landmark distance in "Recursive Cascaded Networks for Unsupervised Medical Image Registration HOT 3
- ValueError: Cannot execute operation using `run() and CUBLAS_STATUS_EXECUTION_FAILED
- No default session is registered. Use `with sess.as_default():` or pass an explicit session to `run(session=sess)` HOT 2
- about how to wrap a label HOT 3
- Question about code HOT 3
- itk::ERROR: Key '0008|103e' does not exist when run demo.py HOT 2
- freeze graph problem HOT 1
- About tensorflow version HOT 1
- How to use the custom warp with linux system
- Questions about the size of the cascaded network model
- The meaning of Grid HOT 3
- have a mistake
- loss function is nan while training
- 2D image registration
- KeyError: 'volume' HOT 1
- Questions about key points in the SLIVER dataset HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recursive-cascaded-networks.