dpressel / rude-carnie

Age detection in Tensorflow
937 stars 341 forks source link

Unable to test #55

Closed Zumbalamambo closed 6 years ago

Zumbalamambo commented 6 years ago

Im getting the following error

Traceback (most recent call last):
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1323, in _do_call
    return fn(*args)
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1302, in _run_fn
    status, run_metadata)
  File "C:\Program Files\Anaconda3\lib\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: Assign requires shapes of both tensors to match. lhs shape= [2] rhs shape= [8]
     [[Node: save/Assign_376 = Assign[T=DT_FLOAT, _class=["loc:@output/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](output/biases, save/RestoreV2_376)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/R&D/Documents/rude-carnie-master/rude-carnie-master/modified_guess.py", line 201, in <module>
    tf.app.run()
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "C:/Users/R&D/Documents/rude-carnie-master/rude-carnie-master/modified_guess.py", line 194, in main
    run_camera()
  File "C:/Users/R&D/Documents/rude-carnie-master/rude-carnie-master/modified_guess.py", line 157, in run_camera
    model_sex = ImportGraph(FLAGS.model_sex_dir, "sex")
  File "C:/Users/R&D/Documents/rude-carnie-master/rude-carnie-master/modified_guess.py", line 110, in __init__
    saver.restore(self.sess, model_checkpoint_path)
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1666, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 889, in run
    run_metadata_ptr)
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1120, in _run
    feed_dict_tensor, options, run_metadata)
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1317, in _do_run
    options, run_metadata)
  File "C:\Program Files\Anaconda3\lib\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: Assign requires shapes of both tensors to match. lhs shape= [2] rhs shape= [8]
     [[Node: save/Assign_376 = Assign[T=DT_FLOAT, _class=["loc:@output/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](output/biases, save/RestoreV2_376)]]

Caused by op 'save/Assign_376', defined at:
  File "C:/Users/R&D/Documents/rude-carnie-master/rude-carnie-master/modified_guess.py", line 201, in <module>
    tf.app.run()
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "C:/Users/R&D/Documents/rude-carnie-master/rude-carnie-master/modified_guess.py", line 194, in main
    run_camera()
  File "C:/Users/R&D/Documents/rude-carnie-master/rude-carnie-master/modified_guess.py", line 157, in run_camera
    model_sex = ImportGraph(FLAGS.model_sex_dir, "sex")
  File "C:/Users/R&D/Documents/rude-carnie-master/rude-carnie-master/modified_guess.py", line 106, in __init__
    saver = tf.train.Saver()
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1218, in __init__
    self.build()
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1227, in build
    self._build(self._filename, build_save=True, build_restore=True)
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 1263, in _build
    build_save=build_save, build_restore=build_restore)
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 751, in _build_internal
    restore_sequentially, reshape)
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 439, in _AddRestoreOps
    assign_ops.append(saveable.restore(tensors, shapes))
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\training\saver.py", line 160, in restore
    self.op.get_shape().is_fully_defined())
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\state_ops.py", line 276, in assign
    validate_shape=validate_shape)
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_state_ops.py", line 56, in assign
    use_locking=use_locking, name=name)
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 2956, in create_op
    op_def=op_def)
  File "C:\Program Files\Anaconda3\lib\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): Assign requires shapes of both tensors to match. lhs shape= [2] rhs shape= [8]
     [[Node: save/Assign_376 = Assign[T=DT_FLOAT, _class=["loc:@output/biases"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](output/biases, save/RestoreV2_376)]]

Process finished with exit code 1
dpressel commented 6 years ago

Im not sure what you are referring to, but this is not code from my repository