{
  "id": 107725,
  "title": "4212 different labels. Correct?",
  "url": "/competitions/kuzushiji-recognition/discussion/107725",
  "author_name": "dmitrykonovalov",
  "post_date": "2019-09-06T08:12:58.768000",
  "votes": 1,
  "comment_count": 7,
  "views": 0,
  "content": "<p>Quick check: there are 4212 different labels/classes. Correct?</p>",
  "messages": [
    {
      "id": 619471,
      "postDate": "2019-09-06T08:12:58.770Z",
      "content": "<p>Quick check: there are 4212 different labels/classes. Correct?</p>",
      "rawMarkdown": "Quick check: there are 4212 different labels/classes. Correct?",
      "votes": 1
    },
    {
      "id": 633960,
      "postDate": "2019-09-25T16:14:39.363Z",
      "content": "<p>I got the same too. Mind I ask how many characters are there? I got 1,344,455 characters in total of all classes.</p>",
      "rawMarkdown": "I got the same too. Mind I ask how many characters are there? I got 1,344,455 characters in total of all classes."
    },
    {
      "id": 627917,
      "postDate": "2019-09-16T15:29:49.880Z",
      "content": "<p>Hello,</p>\n\n<p>How do you manage a model with such high number of labels? Is there a more efficient way to define the output of a neural network instead of defining 4200 output nodes?</p>\n\n<p>Thank you\nJesús</p>",
      "rawMarkdown": "Hello,\n\nHow do you manage a model with such high number of labels? Is there a more efficient way to define the output of a neural network instead of defining 4200 output nodes?\n\nThank you\nJesús",
      "replies": [
        {
          "id": 628017,
          "postDate": "2019-09-16T17:41:48.670Z",
          "content": "<p>There are ways to avoid having number of output nodes less than the number of classes, but they are usually used in language modeling with hundreds of thousands of classes, for 4k classes normal linear output layer works well enough.\nAnother option is to output embeddings and use nearest neighbors (metric learning), I didn't try it here yet. But you still usually use classification for training such embeddings.</p>",
          "rawMarkdown": "There are ways to avoid having number of output nodes less than the number of classes, but they are usually used in language modeling with hundreds of thousands of classes, for 4k classes normal linear output layer works well enough.\nAnother option is to output embeddings and use nearest neighbors (metric learning), I didn't try it here yet. But you still usually use classification for training such embeddings.",
          "votes": 3
        }
      ]
    },
    {
      "id": 620765,
      "postDate": "2019-09-08T00:20:52.500Z",
      "content": "<p>Only one image per U+3B87, U+3C55, U+003F, U+4C61, U+4C99\nAlso U+003F is shown as '?' in NotoSerifCJKjp-Regular.otf font. Fun times.</p>",
      "rawMarkdown": "Only one image per U+3B87, U+3C55, U+003F, U+4C61, U+4C99\nAlso U+003F is shown as '?' in NotoSerifCJKjp-Regular.otf font. Fun times."
    },
    {
      "id": 620475,
      "postDate": "2019-09-07T14:46:58.530Z",
      "content": "<p>I get that result too, but sometimes the labels string is returned as a float!? Still investigating that</p>",
      "rawMarkdown": "I get that result too, but sometimes the labels string is returned as a float!? Still investigating that",
      "replies": [
        {
          "id": 620612,
          "postDate": "2019-09-07T18:35:23.443Z",
          "content": "<p>I imagine that means the label in NaN - you can check with <code>np.isnan</code>. It just means there are no characters on the page.</p>",
          "rawMarkdown": "I imagine that means the label in NaN - you can check with `np.isnan`. It just means there are no characters on the page.",
          "votes": 1
        }
      ]
    },
    {
      "id": 635515,
      "postDate": "2019-09-27T18:26:29.127Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 633960,
      "author_name": "Tanyapohn",
      "author_url": "",
      "post_date": "2019-09-25T16:14:39.363000",
      "content": "<p>I got the same too. Mind I ask how many characters are there? I got 1,344,455 characters in total of all classes.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 627917,
      "author_name": "Jesús Martín de la Sierra",
      "author_url": "",
      "post_date": "2019-09-16T15:29:49.880000",
      "content": "<p>Hello,</p>\n\n<p>How do you manage a model with such high number of labels? Is there a more efficient way to define the output of a neural network instead of defining 4200 output nodes?</p>\n\n<p>Thank you\nJesús</p>",
      "votes": 0,
      "replies": [
        {
          "id": 628017,
          "author_name": "Konstantin Lopukhin",
          "author_url": "",
          "post_date": "2019-09-16T17:41:48.670000",
          "content": "<p>There are ways to avoid having number of output nodes less than the number of classes, but they are usually used in language modeling with hundreds of thousands of classes, for 4k classes normal linear output layer works well enough.\nAnother option is to output embeddings and use nearest neighbors (metric learning), I didn't try it here yet. But you still usually use classification for training such embeddings.</p>",
          "votes": 3,
          "replies": []
        }
      ]
    },
    {
      "id": 620765,
      "author_name": "dmitrykonovalov",
      "author_url": "",
      "post_date": "2019-09-08T00:20:52.500000",
      "content": "<p>Only one image per U+3B87, U+3C55, U+003F, U+4C61, U+4C99\nAlso U+003F is shown as '?' in NotoSerifCJKjp-Regular.otf font. Fun times.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 620475,
      "author_name": "Chris Laux",
      "author_url": "",
      "post_date": "2019-09-07T14:46:58.530000",
      "content": "<p>I get that result too, but sometimes the labels string is returned as a float!? Still investigating that</p>",
      "votes": 0,
      "replies": [
        {
          "id": 620612,
          "author_name": "Ollie Perrée",
          "author_url": "",
          "post_date": "2019-09-07T18:35:23.443000",
          "content": "<p>I imagine that means the label in NaN - you can check with <code>np.isnan</code>. It just means there are no characters on the page.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 635515,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-09-27T18:26:29.127000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "619471": "Quick check: there are 4212 different labels/classes. Correct?",
    "633960": "I got the same too. Mind I ask how many characters are there? I got 1,344,455 characters in total of all classes.",
    "627917": "Hello,\n\nHow do you manage a model with such high number of labels? Is there a more efficient way to define the output of a neural network instead of defining 4200 output nodes?\n\nThank you\nJesús",
    "620765": "Only one image per U+3B87, U+3C55, U+003F, U+4C61, U+4C99\nAlso U+003F is shown as '?' in NotoSerifCJKjp-Regular.otf font. Fun times.",
    "620475": "I get that result too, but sometimes the labels string is returned as a float!? Still investigating that",
    "635515": ""
  }
}