GithubHelp home page GithubHelp logo

Comments (7)

dvornikita avatar dvornikita commented on July 4, 2024

What is the problem here?

from blitznet.

EchoAmor avatar EchoAmor commented on July 4, 2024

@chenbolinstudent I have met the same problem like yours! can you tell me how to solve this? I want to test my own pictures and get results,how to do so ?thanks a lot !!!! @dvornikita

from blitznet.

dvornikita avatar dvornikita commented on July 4, 2024

But what is the error message you are receiving?

from blitznet.

EchoAmor avatar EchoAmor commented on July 4, 2024

/home/echo/anaconda3/envs/Blitznet/bin/python /home/echo/a_project/blitznet/demo.py --run_name=BlitzNet300_COCO --x4 --segment --eval_min_conf=0.5 --ckpt=1

The error message is :

`2019-07-01 09:47:02.995633: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Adding visible gpu devices: 0
2019-07-01 09:47:08.603265: I tensorflow/core/common_runtime/gpu/gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-07-01 09:47:08.603312: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0
2019-07-01 09:47:08.603326: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 0: N
2019-07-01 09:47:08.612055: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11313 MB memory) -> physical GPU (device: 0, name: GeForce GTX TITAN X, pci bus id: 0000:06:00.0, compute capability: 5.2)
Traceback (most recent call last):
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1278, in _do_call
return fn(*args)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1263, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1350, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [1,1,512,64] rhs shape= [3,3,512,64]
[[Node: save/Assign_266 = Assign[T=DT_FLOAT, _class=["loc:@ssd/Conv/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](ssd/Conv/weights, save/RestoreV2/_533)]]
[[Node: save/RestoreV2/_792 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_798_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 1725, in restore
{self.saver_def.filename_tensor_name: save_path})
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 877, in run
run_metadata_ptr)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1100, in _run
feed_dict_tensor, options, run_metadata)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1272, in _do_run
run_metadata)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1291, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [1,1,512,64] rhs shape= [3,3,512,64]
[[Node: save/Assign_266 = Assign[T=DT_FLOAT, _class=["loc:@ssd/Conv/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](ssd/Conv/weights, save/RestoreV2/_533)]]
[[Node: save/RestoreV2/_792 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_798_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

Caused by op 'save/Assign_266', defined at:
File "/home/echo/a_project/blitznet/demo.py", line 68, in
tf.app.run()
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/echo/a_project/blitznet/demo.py", line 57, in main
detector.restore_from_ckpt(args.ckpt)
File "/home/echo/a_project/blitznet/detector.py", line 110, in restore_from_ckpt
saver = tf.train.Saver(tf.global_variables())
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 1281, in init
self.build()
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 1293, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 1330, in _build
build_save=build_save, build_restore=build_restore)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 778, in _build_internal
restore_sequentially, reshape)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 419, in _AddRestoreOps
assign_ops.append(saveable.restore(saveable_tensors, shapes))
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 112, in restore
self.op.get_shape().is_fully_defined())
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/ops/state_ops.py", line 216, in assign
validate_shape=validate_shape)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/ops/gen_state_ops.py", line 60, in assign
use_locking=use_locking, name=name)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op
op_def=op_def)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1717, in init
self._traceback = tf_stack.extract_stack()

InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [1,1,512,64] rhs shape= [3,3,512,64]
[[Node: save/Assign_266 = Assign[T=DT_FLOAT, _class=["loc:@ssd/Conv/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](ssd/Conv/weights, save/RestoreV2/_533)]]
[[Node: save/RestoreV2/_792 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_798_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/echo/a_project/blitznet/demo.py", line 68, in
tf.app.run()
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/echo/a_project/blitznet/demo.py", line 57, in main
detector.restore_from_ckpt(args.ckpt)
File "/home/echo/a_project/blitznet/detector.py", line 111, in restore_from_ckpt
saver.restore(self.sess, ckpt_path)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 1759, in restore
err, "a mismatch between the current graph and the graph")
tensorflow.python.framework.errors_impl.InvalidArgumentError: Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Assign requires shapes of both tensors to match. lhs shape= [1,1,512,64] rhs shape= [3,3,512,64]
[[Node: save/Assign_266 = Assign[T=DT_FLOAT, _class=["loc:@ssd/Conv/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](ssd/Conv/weights, save/RestoreV2/_533)]]
[[Node: save/RestoreV2/_792 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_798_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

Caused by op 'save/Assign_266', defined at:
File "/home/echo/a_project/blitznet/demo.py", line 68, in
tf.app.run()
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 125, in run
_sys.exit(main(argv))
File "/home/echo/a_project/blitznet/demo.py", line 57, in main
detector.restore_from_ckpt(args.ckpt)
File "/home/echo/a_project/blitznet/detector.py", line 110, in restore_from_ckpt
saver = tf.train.Saver(tf.global_variables())
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 1281, in init
self.build()
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 1293, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 1330, in _build
build_save=build_save, build_restore=build_restore)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 778, in _build_internal
restore_sequentially, reshape)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 419, in _AddRestoreOps
assign_ops.append(saveable.restore(saveable_tensors, shapes))
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/training/saver.py", line 112, in restore
self.op.get_shape().is_fully_defined())
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/ops/state_ops.py", line 216, in assign
validate_shape=validate_shape)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/ops/gen_state_ops.py", line 60, in assign
use_locking=use_locking, name=name)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op
op_def=op_def)
File "/home/echo/anaconda3/envs/Blitznet/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1717, in init
self._traceback = tf_stack.extract_stack()

InvalidArgumentError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Assign requires shapes of both tensors to match. lhs shape= [1,1,512,64] rhs shape= [3,3,512,64]
[[Node: save/Assign_266 = Assign[T=DT_FLOAT, _class=["loc:@ssd/Conv/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](ssd/Conv/weights, save/RestoreV2/_533)]]
[[Node: save/RestoreV2/_792 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_798_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]`

from blitznet.

dvornikita avatar dvornikita commented on July 4, 2024

I see what is going on. Run the same command with an additional flag --seg_filter_size=3
That should help.

from blitznet.

EchoAmor avatar EchoAmor commented on July 4, 2024

I just tried,but it didn't work ,the error message is:

`InvalidArgumentError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Assign requires shapes of both tensors to match. lhs shape= [3,3,448,21] rhs shape= [3,3,448,81]
[[Node: save/Assign_280 = Assign[T=DT_FLOAT, _class=["loc:@ssd/Conv_7/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](ssd/Conv_7/weights, save/RestoreV2/_561)]]
[[Node: save/RestoreV2/_802 = _SendT=DT_FLOAT, client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_808_save/RestoreV2", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
`

from blitznet.

dvornikita avatar dvornikita commented on July 4, 2024

Oh, I see now. You are using the wrong model name. Instead of --run_name=BlitzNet300_COCO there should be --run_name=BlitzNet300_COCO+VOC07+12

Follow the readme and everything should work

from blitznet.

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.