{"action":"opened","issue":{"url":"https://api.github.com/repos/bartvm/fuel/issues/13","labels_url":"https://api.github.com/repos/bartvm/fuel/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/bartvm/fuel/issues/13/comments","events_url":"https://api.github.com/repos/bartvm/fuel/issues/13/events","html_url":"https://github.com/bartvm/fuel/issues/13","id":58541457,"number":13,"title":"Type checking data through axis semantics","user":{"login":"bartvm","id":2299595,"avatar_url":"https://avatars.githubusercontent.com/u/2299595?v=3","gravatar_id":"","url":"https://api.github.com/users/bartvm","html_url":"https://github.com/bartvm","followers_url":"https://api.github.com/users/bartvm/followers","following_url":"https://api.github.com/users/bartvm/following{/other_user}","gists_url":"https://api.github.com/users/bartvm/gists{/gist_id}","starred_url":"https://api.github.com/users/bartvm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartvm/subscriptions","organizations_url":"https://api.github.com/users/bartvm/orgs","repos_url":"https://api.github.com/users/bartvm/repos","events_url":"https://api.github.com/users/bartvm/events{/privacy}","received_events_url":"https://api.github.com/users/bartvm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-23T04:32:43Z","updated_at":"2015-02-23T04:32:43Z","closed_at":null,"body":"Following offline discussion with @lamblin and @vdumoulin, we agreed that the most important kind of type checking to perform in the data processing pipeline is probably the semantics of the axes of the data. Data streams should provide information about what each axis of the input and output represents e.g.\r\n\r\n* An image: `(channel, height, width)`\r\n* A batch of images: `(batch, channel, height, width)\r\n* A sentence (sequence of indices): `(features)` (maybe a `labels` role?) or before going into Blocks: `(time, batch, features)`\r\n* A set of n-grams from a sentence: `(batch, features)`\r\n\r\nThe behaviour of data streams regarding these labels should be configurable, so they can either ignore, warn or raise errors if the data input is not what they expected.\r\n\r\nSome things that need to be thought about:\r\n\r\n* Do we just use strings, or do use singletons (allowing us to create a class hierarchy)?\r\n* Do we want to add dimensionality e.g. each axis has a dimensionality (or can be variable)? This could be useful to check that e.g. an image has exactly 3 colour channels.\r\n    * Longer term, this would also allow for the kind of checking that Pylearn2 performs (e.g. make sure that the data dimension is the same as the input layer/brick).\r\n\r\nThis is closely related to https://github.com/bartvm/blocks/issues/30"}}