{
  "id": 40503,
  "title": "Tensorflow Error: Cannot Fixed by Myself",
  "url": "/competitions/cdiscount-image-classification-challenge/discussion/40503",
  "author_name": "",
  "post_date": "2017-10-03T16:04:41.317093500Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hi, I was trying to create a pipeline to load batch training data from TFRecords and optimize my simple convolution NN. However, what I am facing is my pipeline works fine (tf.session) without run the code blocks of building computation graph. However, once I run the code blocks to build computation graph and then run tf.session (even if I don't run optimizer in the session), my kernel died every time without any error or notice threw at me. I have no idea what is going on. Can someone help me out here? Thank you.</p>\n\n<p>My code is at:  <a href=\"https://github.com/wenbo5565/admin/blob/master/Model%2BBuilding.ipynb\">https://github.com/wenbo5565/admin/blob/master/Model%2BBuilding.ipynb</a></p>",
  "messages": [
    {
      "id": "227050",
      "postDate": "10/03/2017 16:04:41",
      "content": "<p>Hi, I was trying to create a pipeline to load batch training data from TFRecords and optimize my simple convolution NN. However, what I am facing is my pipeline works fine (tf.session) without run the code blocks of building computation graph. However, once I run the code blocks to build computation graph and then run tf.session (even if I don't run optimizer in the session), my kernel died every time without any error or notice threw at me. I have no idea what is going on. Can someone help me out here? Thank you.</p>\n\n<p>My code is at:  <a href=\"https://github.com/wenbo5565/admin/blob/master/Model%2BBuilding.ipynb\">https://github.com/wenbo5565/admin/blob/master/Model%2BBuilding.ipynb</a></p>",
      "rawMarkdown": "Hi, I was trying to create a pipeline to load batch training data from TFRecords and optimize my simple convolution NN. However, what I am facing is my pipeline works fine (tf.session) without run the code blocks of building computation graph. However, once I run the code blocks to build computation graph and then run tf.session (even if I don't run optimizer in the session), my kernel died every time without any error or notice threw at me. I have no idea what is going on. Can someone help me out here? Thank you.\n\nMy code is at:  https://github.com/wenbo5565/admin/blob/master/Model%2BBuilding.ipynb",
      "votes": null
    },
    {
      "id": "236534",
      "postDate": "10/27/2017 15:30:04",
      "content": "<p>Hi Wenbo,</p>\n\n<p>I am not a TensorFlow evangelist and I do not find any issues in your code, but you should try to catch and report exception within the main loop of your session.</p>\n\n<p>To do so, you could try this exception handling: </p>\n\n<pre><code># Initialize global and local variables\ninit = tf.group(tf.local_variables_initializer(),\n                tf.global_variables_initializer())\n\nwith tf.Session() as sess:\n  sess.run(init)\n  coord = tf.train.Coordinator()\n  threads = tf.train.start_queue_runners(coord=coord)\n\n  try:\n    while not coord.should_stop():\n      # run session\n\n  except tf.errors.OutOfRangeError:\n    print('Done reading filename queue')\n  finally:\n    coord.request_stop()\n\ncoord.join(threads)\nsess.close()\n</code></pre>\n\n<p>I hope that helps you out.</p>",
      "rawMarkdown": "Hi Wenbo,\n\nI am not a TensorFlow evangelist and I do not find any issues in your code, but you should try to catch and report exception within the main loop of your session.\n\nTo do so, you could try this exception handling: \n\n    # Initialize global and local variables\n    init = tf.group(tf.local_variables_initializer(),\n                    tf.global_variables_initializer())\n    \n    with tf.Session() as sess:\n      sess.run(init)\n      coord = tf.train.Coordinator()\n      threads = tf.train.start_queue_runners(coord=coord)\n      \n      try:\n        while not coord.should_stop():\n          # run session\n   \n      except tf.errors.OutOfRangeError:\n        print('Done reading filename queue')\n      finally:\n        coord.request_stop()\n    \n    coord.join(threads)\n    sess.close()\n\nI hope that helps you out.",
      "votes": null
    },
    {
      "id": "236538",
      "postDate": "10/27/2017 15:48:19",
      "content": "<p>Look at jupyter notebook console the rrrors are sometimes reported there. Or export the notebook as a script and try running it outside of the notebook. </p>",
      "rawMarkdown": "Look at jupyter notebook console the rrrors are sometimes reported there. Or export the notebook as a script and try running it outside of the notebook.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 236534,
      "author_name": "jekoehler",
      "author_url": "",
      "post_date": "10/27/2017 15:30:04",
      "content": "<p>Hi Wenbo,</p>\n\n<p>I am not a TensorFlow evangelist and I do not find any issues in your code, but you should try to catch and report exception within the main loop of your session.</p>\n\n<p>To do so, you could try this exception handling: </p>\n\n<pre><code># Initialize global and local variables\ninit = tf.group(tf.local_variables_initializer(),\n                tf.global_variables_initializer())\n\nwith tf.Session() as sess:\n  sess.run(init)\n  coord = tf.train.Coordinator()\n  threads = tf.train.start_queue_runners(coord=coord)\n\n  try:\n    while not coord.should_stop():\n      # run session\n\n  except tf.errors.OutOfRangeError:\n    print('Done reading filename queue')\n  finally:\n    coord.request_stop()\n\ncoord.join(threads)\nsess.close()\n</code></pre>\n\n<p>I hope that helps you out.</p>",
      "votes": null,
      "replies": [
        {
          "id": 236538,
          "author_name": "mpekalski",
          "author_url": "",
          "post_date": "10/27/2017 15:48:19",
          "content": "<p>Look at jupyter notebook console the rrrors are sometimes reported there. Or export the notebook as a script and try running it outside of the notebook. </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "227050": "Hi, I was trying to create a pipeline to load batch training data from TFRecords and optimize my simple convolution NN. However, what I am facing is my pipeline works fine (tf.session) without run the code blocks of building computation graph. However, once I run the code blocks to build computation graph and then run tf.session (even if I don't run optimizer in the session), my kernel died every time without any error or notice threw at me. I have no idea what is going on. Can someone help me out here? Thank you.\n\nMy code is at:  https://github.com/wenbo5565/admin/blob/master/Model%2BBuilding.ipynb",
    "236534": "Hi Wenbo,\n\nI am not a TensorFlow evangelist and I do not find any issues in your code, but you should try to catch and report exception within the main loop of your session.\n\nTo do so, you could try this exception handling: \n\n    # Initialize global and local variables\n    init = tf.group(tf.local_variables_initializer(),\n                    tf.global_variables_initializer())\n    \n    with tf.Session() as sess:\n      sess.run(init)\n      coord = tf.train.Coordinator()\n      threads = tf.train.start_queue_runners(coord=coord)\n      \n      try:\n        while not coord.should_stop():\n          # run session\n   \n      except tf.errors.OutOfRangeError:\n        print('Done reading filename queue')\n      finally:\n        coord.request_stop()\n    \n    coord.join(threads)\n    sess.close()\n\nI hope that helps you out.",
    "236538": "Look at jupyter notebook console the rrrors are sometimes reported there. Or export the notebook as a script and try running it outside of the notebook."
  },
  "source": "meta"
}