jamesmf / mnistCRNN

Simple TimeDistributed() wrapper Demo in Keras; sums images of MNIST digits
61 stars 24 forks source link

How can I preprocess mnist data to adapt to your CRNN? #9

Closed mengqiShen closed 6 years ago

mengqiShen commented 6 years ago

I want to know, do you manually divide mnist data to maxToAdd length or what? the dimensions of mnist is (60000,28,28,1), which 28*28 represent the size of it and 1 represents the channel, the first layer of the model needs 5 dimension like (maxToAdd, 60000,28,28,1), and when i tried to divide data like this, it showed another mistake: ValueError: Error when checking target: expected dense_19 to have 2 dimensions, but got array with shape (60000, maxToAdd, pool_size,pool_size, 1). so can you tell me how do you deal with the input in model.fit?

jamesmf commented 6 years ago

The 5 dimensions required are (num_examples, maxToAdd, 28, 28, 1).

Feel free to share some code so we can see what's different.

mengqiShen commented 6 years ago

I already understood this question by reading your code,thank you !发自我的华为手机-------- 原始邮件 --------主题:Re: [jamesmf/mnistCRNN] How can I preprocess mnist data to adapt to your CRNN? (#9)发件人:jamesmf 收件人:jamesmf/mnistCRNN 抄送:mengqiShen ,Author The 5 dimensions required are (num_examples, maxToAdd, 28, 28, 1). Feel free to share some code so we can see what's different.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/jamesmf/mnistCRNN","title":"jamesmf/mnistCRNN","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/jamesmf/mnistCRNN"}},"updates":{"snippets":[{"icon":"PERSON","message":"@jamesmf in #9: The 5 dimensions required are (num_examples, maxToAdd, 28, 28, 1). \r\n\r\nFeel free to share some code so we can see what's different."}],"action":{"name":"View Issue","url":"https://github.com/jamesmf/mnistCRNN/issues/9#issuecomment-351097195"}}}