{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/4109","repository_url":"https://api.github.com/repos/BVLC/caffe","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/4109/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/4109/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/4109/events","html_url":"https://github.com/BVLC/caffe/issues/4109","id":153579239,"number":4109,"title":"Read data from lmdb incorrectly","user":{"login":"dbysll","id":10887398,"avatar_url":"https://avatars.githubusercontent.com/u/10887398?v=3","gravatar_id":"","url":"https://api.github.com/users/dbysll","html_url":"https://github.com/dbysll","followers_url":"https://api.github.com/users/dbysll/followers","following_url":"https://api.github.com/users/dbysll/following{/other_user}","gists_url":"https://api.github.com/users/dbysll/gists{/gist_id}","starred_url":"https://api.github.com/users/dbysll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbysll/subscriptions","organizations_url":"https://api.github.com/users/dbysll/orgs","repos_url":"https://api.github.com/users/dbysll/repos","events_url":"https://api.github.com/users/dbysll/events{/privacy}","received_events_url":"https://api.github.com/users/dbysll/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-07T07:24:15Z","updated_at":"2016-05-07T07:47:10Z","closed_at":null,"body":"Hello, I am working on non-image data (floating point), and I saved the data into lmdb, which seems to work since I can read the correct values from the lmdb. (I guess this is because I am able to specify the correct type by using \"np.fromstring(datum.data, dtype=np.float64)\" )\r\n\r\nHowever, the values in the data blob are messed up. I am wondering if this is a bug of Caffe? Or it is just a limitation of Caffe that it can only interpret datum.data saved in lmdb as uint8?\r\n\r\nBtw, it seems to me that there is no way for Caffe to know that which data type to use to interpret datum.data. So I assume the unit8 is the default type? But this is not specified in any tutorials or examples.\r\n\r\nSorry for my ignorance in advance, I am a complete novice to Caffe. \r\n\r\nLillian   "},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/217614241","html_url":"https://github.com/BVLC/caffe/issues/4109#issuecomment-217614241","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/4109","id":217614241,"user":{"login":"gpascualg","id":1239061,"avatar_url":"https://avatars.githubusercontent.com/u/1239061?v=3","gravatar_id":"","url":"https://api.github.com/users/gpascualg","html_url":"https://github.com/gpascualg","followers_url":"https://api.github.com/users/gpascualg/followers","following_url":"https://api.github.com/users/gpascualg/following{/other_user}","gists_url":"https://api.github.com/users/gpascualg/gists{/gist_id}","starred_url":"https://api.github.com/users/gpascualg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpascualg/subscriptions","organizations_url":"https://api.github.com/users/gpascualg/orgs","repos_url":"https://api.github.com/users/gpascualg/repos","events_url":"https://api.github.com/users/gpascualg/events{/privacy}","received_events_url":"https://api.github.com/users/gpascualg/received_events","type":"User","site_admin":false},"created_at":"2016-05-07T07:47:10Z","updated_at":"2016-05-07T07:47:10Z","body":"No need to modify any C code, that's all from python:\r\n\r\n```python\r\n    datum = caffe.proto.caffe_pb2.Datum()\r\n    datum.channels = quant.shape[0]\r\n    datum.height = 1\r\n    datum.width = 1\r\n    datum.float_data.extend(quant.astype(float).flat)\r\n    datum.label = label\r\n```\r\nThen serialize it to the lmdb"}}