{
  "id": 254515,
  "title": "How to apply Albumentations in using GCS bucket with TPU ?  ",
  "url": "/competitions/siim-covid19-detection/discussion/254515",
  "author_name": "",
  "post_date": "2021-07-22T08:03:04.784935600Z",
  "votes": 1,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hi, kagglers.</p>\n<p>Base notebook that I used is <a href=\"https://www.kaggle.com/h053473666/siim-covid19-efnb7-train-study\" target=\"_blank\">https://www.kaggle.com/h053473666/siim-covid19-efnb7-train-study</a>.</p>\n<p>I tried to apply albumentations for data augmentation because tf.image methods are poor than albumentations. But, I'am facing <code>TypeError: image must be numpy array type</code>. </p>\n<p>And then, I convert image type to numpy array like <code>img = img.numpy()</code>. Another error pops up <code>AttributeError: 'Tensor' object has no attribute 'numpy'</code>.</p>\n<p>Finally, I replace GCS bucket code to tensorflow.keras.utils.Sequence for load training data that data type is numpy array. Unfortunately, however, UnavailableError has occured during <code>model.fit()</code>. (<code>UnavailableError: 9 root error(s) found. failed to connect to all addresses</code>)</p>\n<p>Do anyone have idea to address this issue? <br>\nIf know that, please comment.</p>\n<p>Thanks.</p>",
  "messages": [
    {
      "id": "1396567",
      "postDate": "07/22/2021 08:03:04",
      "content": "<p>Hi, kagglers.</p>\n<p>Base notebook that I used is <a href=\"https://www.kaggle.com/h053473666/siim-covid19-efnb7-train-study\" target=\"_blank\">https://www.kaggle.com/h053473666/siim-covid19-efnb7-train-study</a>.</p>\n<p>I tried to apply albumentations for data augmentation because tf.image methods are poor than albumentations. But, I'am facing <code>TypeError: image must be numpy array type</code>. </p>\n<p>And then, I convert image type to numpy array like <code>img = img.numpy()</code>. Another error pops up <code>AttributeError: 'Tensor' object has no attribute 'numpy'</code>.</p>\n<p>Finally, I replace GCS bucket code to tensorflow.keras.utils.Sequence for load training data that data type is numpy array. Unfortunately, however, UnavailableError has occured during <code>model.fit()</code>. (<code>UnavailableError: 9 root error(s) found. failed to connect to all addresses</code>)</p>\n<p>Do anyone have idea to address this issue? <br>\nIf know that, please comment.</p>\n<p>Thanks.</p>",
      "rawMarkdown": "Hi, kagglers.\n\nBase notebook that I used is https://www.kaggle.com/h053473666/siim-covid19-efnb7-train-study.\n\nI tried to apply albumentations for data augmentation because tf.image methods are poor than albumentations. But, I'am facing `TypeError: image must be numpy array type`. \n\nAnd then, I convert image type to numpy array like `img = img.numpy()`. Another error pops up `AttributeError: 'Tensor' object has no attribute 'numpy'`.\n \nFinally, I replace GCS bucket code to tensorflow.keras.utils.Sequence for load training data that data type is numpy array. Unfortunately, however, UnavailableError has occured during `model.fit()`. (`UnavailableError: 9 root error(s) found. failed to connect to all addresses`)\n\nDo anyone have idea to address this issue? \nIf know that, please comment.\n\nThanks.",
      "votes": null
    },
    {
      "id": "1396794",
      "postDate": "07/22/2021 13:59:39",
      "content": "<p>You can only use tf functions if you are using Dataset<br>\nYou can find some good examples on the flower TPU competition kernals.  </p>",
      "rawMarkdown": "You can only use tf functions if you are using Dataset\nYou can find some good examples on the flower TPU competition kernals.",
      "votes": null
    },
    {
      "id": "1397214",
      "postDate": "07/22/2021 23:35:15",
      "content": "<p>Thanks a lot ! </p>",
      "rawMarkdown": "Thanks a lot !",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1396794,
      "author_name": "readoc",
      "author_url": "",
      "post_date": "07/22/2021 13:59:39",
      "content": "<p>You can only use tf functions if you are using Dataset<br>\nYou can find some good examples on the flower TPU competition kernals.  </p>",
      "votes": null,
      "replies": [
        {
          "id": 1397214,
          "author_name": "seongwook93",
          "author_url": "",
          "post_date": "07/22/2021 23:35:15",
          "content": "<p>Thanks a lot ! </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1396567": "Hi, kagglers.\n\nBase notebook that I used is https://www.kaggle.com/h053473666/siim-covid19-efnb7-train-study.\n\nI tried to apply albumentations for data augmentation because tf.image methods are poor than albumentations. But, I'am facing `TypeError: image must be numpy array type`. \n\nAnd then, I convert image type to numpy array like `img = img.numpy()`. Another error pops up `AttributeError: 'Tensor' object has no attribute 'numpy'`.\n \nFinally, I replace GCS bucket code to tensorflow.keras.utils.Sequence for load training data that data type is numpy array. Unfortunately, however, UnavailableError has occured during `model.fit()`. (`UnavailableError: 9 root error(s) found. failed to connect to all addresses`)\n\nDo anyone have idea to address this issue? \nIf know that, please comment.\n\nThanks.",
    "1396794": "You can only use tf functions if you are using Dataset\nYou can find some good examples on the flower TPU competition kernals.",
    "1397214": "Thanks a lot !"
  },
  "source": "meta"
}