{"action":"created","issue":{"url":"https://api.github.com/repos/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/11","repository_url":"https://api.github.com/repos/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10","labels_url":"https://api.github.com/repos/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/11/comments","events_url":"https://api.github.com/repos/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/11/events","html_url":"https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/11","id":308396060,"number":11,"title":"ValueError: Tried to convert 't' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].","user":{"login":"gharis","id":11938453,"avatar_url":"https://avatars1.githubusercontent.com/u/11938453?v=4","gravatar_id":"","url":"https://api.github.com/users/gharis","html_url":"https://github.com/gharis","followers_url":"https://api.github.com/users/gharis/followers","following_url":"https://api.github.com/users/gharis/following{/other_user}","gists_url":"https://api.github.com/users/gharis/gists{/gist_id}","starred_url":"https://api.github.com/users/gharis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gharis/subscriptions","organizations_url":"https://api.github.com/users/gharis/orgs","repos_url":"https://api.github.com/users/gharis/repos","events_url":"https://api.github.com/users/gharis/events{/privacy}","received_events_url":"https://api.github.com/users/gharis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-25T23:21:29Z","updated_at":"2018-04-08T03:15:10Z","closed_at":"2018-04-05T01:53:41Z","author_association":"NONE","body":"(tensorflow1) C:\\tensorflow1\\models\\research\\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config\r\nINFO:tensorflow:Scale of 0 disables regularizer.\r\nINFO:tensorflow:Scale of 0 disables regularizer.\r\nWARNING:tensorflow:From C:\\tensorflow1\\models\\research\\object_detection\\trainer.py:228: create_global_step (from tensorflow.contrib.framework.python.ops.variables) is deprecated and will be removed in a future version.\r\nInstructions for updating:\r\nPlease switch to tf.train.create_global_step\r\nINFO:tensorflow:Scale of 0 disables regularizer.\r\nINFO:tensorflow:Scale of 0 disables regularizer.\r\nINFO:tensorflow:depth of additional conv before box predictor: 0\r\nWARNING:tensorflow:From C:\\tensorflow1\\models\\research\\object_detection\\core\\box_predictor.py:396: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version.\r\nInstructions for updating:\r\nkeep_dims is deprecated, use keepdims instead\r\nWARNING:tensorflow:From C:\\tensorflow1\\models\\research\\object_detection\\core\\losses.py:316: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.\r\nInstructions for updating:\r\n\r\nFuture major versions of TensorFlow will allow gradients to flow\r\ninto the labels input on backprop by default.\r\n\r\nSee tf.nn.softmax_cross_entropy_with_logits_v2.\r\n\r\nTraceback (most recent call last):\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\op_def_library.py\", line 510, in _apply_op_helper\r\n    preferred_dtype=default_dtype)\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\ops.py\", line 1036, in internal_convert_to_tensor\r\n    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\constant_op.py\", line 235, in _constant_tensor_conversion_function\r\n    return constant(v, dtype=dtype, name=name)\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\constant_op.py\", line 214, in constant\r\n    value, dtype=dtype, shape=shape, verify_shape=verify_shape))\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\tensor_util.py\", line 442, in make_tensor_proto\r\n    _GetDenseDimensions(values)))\r\nValueError: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\op_def_library.py\", line 524, in _apply_op_helper\r\n    values, as_ref=input_arg.is_ref).dtype.name\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\ops.py\", line 1036, in internal_convert_to_tensor\r\n    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\constant_op.py\", line 235, in _constant_tensor_conversion_function\r\n    return constant(v, dtype=dtype, name=name)\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\constant_op.py\", line 214, in constant\r\n    value, dtype=dtype, shape=shape, verify_shape=verify_shape))\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\tensor_util.py\", line 442, in make_tensor_proto\r\n    _GetDenseDimensions(values)))\r\nValueError: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 167, in <module>\r\n    tf.app.run()\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\platform\\app.py\", line 126, in run\r\n    _sys.exit(main(argv))\r\n  File \"train.py\", line 163, in main\r\n    worker_job_name, is_chief, FLAGS.train_dir)\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\trainer.py\", line 255, in train\r\n    train_config.optimizer)\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\builders\\optimizer_builder.py\", line 50, in build\r\n    learning_rate = _create_learning_rate(config.learning_rate)\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\builders\\optimizer_builder.py\", line 109, in _create_learning_rate\r\n    learning_rate_sequence, config.warmup)\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\utils\\learning_schedules.py\", line 169, in manual_stepping\r\n    [0] * num_boundaries))\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\ops\\array_ops.py\", line 2619, in where\r\n    return gen_math_ops._select(condition=condition, x=x, y=y, name=name)\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\ops\\gen_math_ops.py\", line 4503, in _select\r\n    \"Select\", condition=condition, t=x, e=y, name=name)\r\n  File \"C:\\anaconda\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\op_def_library.py\", line 528, in _apply_op_helper\r\n    (input_name, err))\r\nValueError: Tried to convert 't' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].\r\n\r\n(tensorflow1) C:\\tensorflow1\\models\\research\\object_detection>\r\n\r\n\r\nI got this error when running train.py command. can you help? "},"comment":{"url":"https://api.github.com/repos/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/comments/379516369","html_url":"https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/11#issuecomment-379516369","issue_url":"https://api.github.com/repos/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/11","id":379516369,"user":{"login":"brandonlima","id":14342188,"avatar_url":"https://avatars3.githubusercontent.com/u/14342188?v=4","gravatar_id":"","url":"https://api.github.com/users/brandonlima","html_url":"https://github.com/brandonlima","followers_url":"https://api.github.com/users/brandonlima/followers","following_url":"https://api.github.com/users/brandonlima/following{/other_user}","gists_url":"https://api.github.com/users/brandonlima/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonlima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonlima/subscriptions","organizations_url":"https://api.github.com/users/brandonlima/orgs","repos_url":"https://api.github.com/users/brandonlima/repos","events_url":"https://api.github.com/users/brandonlima/events{/privacy}","received_events_url":"https://api.github.com/users/brandonlima/received_events","type":"User","site_admin":false},"created_at":"2018-04-08T03:15:10Z","updated_at":"2018-04-08T03:15:10Z","author_association":"NONE","body":"I am getting what looks to be the same exact error and I copied and pasted the new code and now I get this.\r\n\r\n  ```\r\nFile \"C:\\Users\\Brandon\\Anaconda3\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\platform\\app.py\", line 126, in run\r\n    _sys.exit(main(argv))\r\n  File \"train.py\", line 163, in main\r\n    worker_job_name, is_chief, FLAGS.train_dir)\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\trainer.py\", line 255, in train\r\n    train_config.optimizer)\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\builders\\optimizer_builder.py\", line 50, in build\r\n    learning_rate = _create_learning_rate(config.learning_rate)\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\builders\\optimizer_builder.py\", line 109, in _create_learning_rate\r\n    learning_rate_sequence, config.warmup)\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\utils\\learning_schedules.py\", line 169, in manual_stepping\r\n    [0] * num_boundaries))\r\n  File \"C:\\Users\\Brandon\\Anaconda3\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\ops\\array_ops.py\", line 2650, in where\r\n    return gen_math_ops.select(condition=condition, x=x, y=y, name=name)\r\n  File \"C:\\Users\\Brandon\\Anaconda3\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\ops\\gen_math_ops.py\", line 7112, in select\r\n    \"Select\", condition=condition, t=x, e=y, name=name)\r\n  File \"C:\\Users\\Brandon\\Anaconda3\\envs\\tensorflow1\\lib\\site-packages\\tensorflow\\python\\framework\\op_def_library.py\", line 528, in _apply_op_helper\r\n    (input_name, err))\r\nValueError: Tried to convert 't' to a tensor and failed. Error: Argument must be a dense tensor: range(0, 3) - got shape [3], but wanted [].\r\n\r\n(tensorflow1) C:\\tensorflow1\\models\\research\\object_detection>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/faster_rcnn_inception_v2_pets.config\r\nTraceback (most recent call last):\r\n  File \"train.py\", line 49, in <module>\r\n    from object_detection import trainer\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\trainer.py\", line 26, in <module>\r\n    from object_detection.builders import optimizer_builder\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\builders\\optimizer_builder.py\", line 19, in <module>\r\n    from object_detection.utils import learning_schedules\r\n  File \"C:\\tensorflow1\\models\\research\\object_detection\\utils\\learning_schedules.py\", line 170\r\n    return tf.reduce_sum(rates * tf.one_hot(rate_index, depth=num_boundaries),\r\n    ^\r\nIndentationError: unexpected inde\r\n```nt"}}
{"actor":{"display_login":"brandonlima"}}