Giter Club home page Giter Club logo

Comments (5)

zsyzzsoft avatar zsyzzsoft commented on May 18, 2024 1

Please try pip install tflearn==0.3.2

from recursive-cascaded-networks.

zsyzzsoft avatar zsyzzsoft commented on May 18, 2024 1

Are there GPUs on the machine? Did you install tensorflow-gpu or tensorflow?

from recursive-cascaded-networks.

agatadefr avatar agatadefr commented on May 18, 2024 1

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.

agatadefr avatar agatadefr commented on May 18, 2024

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.

Hoodini-Gzj avatar Hoodini-Gzj commented on May 18, 2024

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)

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.