{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/models/issues/3553","repository_url":"https://api.github.com/repos/tensorflow/models","labels_url":"https://api.github.com/repos/tensorflow/models/issues/3553/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/models/issues/3553/comments","events_url":"https://api.github.com/repos/tensorflow/models/issues/3553/events","html_url":"https://github.com/tensorflow/models/issues/3553","id":303908727,"number":3553,"title":"model/official/resnet/cifar10_main.py TypeError","user":{"login":"RoboEvangelist","id":3664583,"avatar_url":"https://avatars3.githubusercontent.com/u/3664583?v=4","gravatar_id":"","url":"https://api.github.com/users/RoboEvangelist","html_url":"https://github.com/RoboEvangelist","followers_url":"https://api.github.com/users/RoboEvangelist/followers","following_url":"https://api.github.com/users/RoboEvangelist/following{/other_user}","gists_url":"https://api.github.com/users/RoboEvangelist/gists{/gist_id}","starred_url":"https://api.github.com/users/RoboEvangelist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoboEvangelist/subscriptions","organizations_url":"https://api.github.com/users/RoboEvangelist/orgs","repos_url":"https://api.github.com/users/RoboEvangelist/repos","events_url":"https://api.github.com/users/RoboEvangelist/events{/privacy}","received_events_url":"https://api.github.com/users/RoboEvangelist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-09T16:56:46Z","updated_at":"2018-03-12T06:20:54Z","closed_at":null,"author_association":"NONE","body":"### System information\r\n- **What is the top-level directory of the model you are using**: model/official/resnet\r\n- **Have I written custom code (as opposed to using a stock example script provided in TensorFlow)**: no\r\n- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: ubuntu 16.04\r\n- **TensorFlow installed from (source or binary)**: source\r\n- **TensorFlow version (use command below)**: 1.4.1\r\n- **Bazel version (if compiling from source)**: 0.6.0\r\n- **CUDA/cuDNN version**: 8.0/6.0\r\n- **GPU model and memory**: GTX 1080 Ti\r\n- **Exact command to reproduce**: python cifar10_main.py\r\n\r\n### Describe the problem\r\nwhen I run cifar10_main.py --data_dir /path, then I get the next error (have already download the cifar 10 from alex's website):\r\n\r\n`TypeError: Failed to convert object of type <class 'tensorflow.python.data.ops.dataset_ops.PrefetchDataset'> to Tensor. Contents: <PrefetchDataset shapes: ((?, 32, 32, 3), (?, 10)), types: (tf.float32, tf.float32)>. Consider casting elements to a supported type.`\r\n\r\n### Source code / logs\r\n\r\n`INFO:tensorflow:Using config: {'_save_checkpoints_secs': 1000000000.0, '_session_config': allow_soft_placement: true\r\n, '_keep_checkpoint_max': 5, '_task_type': 'worker', '_is_chief': True, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7fed2e2588d0>, '_save_checkpoints_steps': None, '_keep_checkpoint_every_n_hours': 10000, '_service': None, '_num_ps_replicas': 0, '_tf_random_seed': None, '_master': '', '_num_worker_replicas': 1, '_task_id': 0, '_log_step_count_steps': 100, '_model_dir': '/tmp/cifar10_model', '_save_summary_steps': 100}\r\nStarting a training cycle.\r\nTraceback (most recent call last):\r\n  File \"cifar10_main.py\", line 224, in <module>\r\n    tf.app.run(argv=[sys.argv[0]] + unparsed)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py\", line 48, in run\r\n    _sys.exit(main(_sys.argv[:1] + flags_passthrough))\r\n  File \"cifar10_main.py\", line 208, in main\r\n    resnet.resnet_main(FLAGS, cifar10_model_fn, input_function)\r\n  File \"/home/luis/models/official/resnet/resnet.py\", line 650, in resnet_main\r\n    classifier.train(input_fn=input_fn_train, hooks=[logging_hook])\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/estimator/estimator.py\", line 302, in train\r\n    loss = self._train_model(input_fn, hooks, saving_listeners)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/estimator/estimator.py\", line 711, in _train_model\r\n    features, labels, model_fn_lib.ModeKeys.TRAIN, self.config)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/estimator/estimator.py\", line 694, in _call_model_fn\r\n    model_fn_results = self._model_fn(features=features, **kwargs)\r\n  File \"cifar10_main.py\", line 177, in cifar10_model_fn\r\n    features = tf.reshape(features, [-1, _HEIGHT, _WIDTH, _NUM_CHANNELS])\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py\", line 3938, in reshape\r\n    \"Reshape\", tensor=tensor, shape=shape, name=name)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py\", line 513, in _apply_op_helper\r\n    raise err\r\nTypeError: Failed to convert object of type <class 'tensorflow.python.data.ops.dataset_ops.PrefetchDataset'> to Tensor. Contents: <PrefetchDataset shapes: ((?, 32, 32, 3), (?, 10)), types: (tf.float32, tf.float32)>. Consider casting elements to a supported type.`\r\n\r\n\r\nI am not why I get the error, nor how to solve it.\r\n"},"comment":{"url":"https://api.github.com/repos/tensorflow/models/issues/comments/372204452","html_url":"https://github.com/tensorflow/models/issues/3553#issuecomment-372204452","issue_url":"https://api.github.com/repos/tensorflow/models/issues/3553","id":372204452,"user":{"login":"RoboEvangelist","id":3664583,"avatar_url":"https://avatars3.githubusercontent.com/u/3664583?v=4","gravatar_id":"","url":"https://api.github.com/users/RoboEvangelist","html_url":"https://github.com/RoboEvangelist","followers_url":"https://api.github.com/users/RoboEvangelist/followers","following_url":"https://api.github.com/users/RoboEvangelist/following{/other_user}","gists_url":"https://api.github.com/users/RoboEvangelist/gists{/gist_id}","starred_url":"https://api.github.com/users/RoboEvangelist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoboEvangelist/subscriptions","organizations_url":"https://api.github.com/users/RoboEvangelist/orgs","repos_url":"https://api.github.com/users/RoboEvangelist/repos","events_url":"https://api.github.com/users/RoboEvangelist/events{/privacy}","received_events_url":"https://api.github.com/users/RoboEvangelist/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T06:20:54Z","updated_at":"2018-03-12T06:20:54Z","author_association":"NONE","body":"I will upgrade to 1.6, then"}}
{"actor":{"display_login":"RoboEvangelist"}}