简体   繁体   中英

Theano: Train theano neural net using data in CSV File

I am doing image classification where i have to detect whether images contains airplane or not.
I am done with following steps:
1. Took features as descriptors from image dataset
2. Done with K - means clustering and generated corpus of descriptors
3. Normalized data of corpus within the range of 0 - 1 and saved it in CSV format file
The csv contains the data like this:

img1,0.23,0.23,0.3 ..... 0.5,airplane
img2,0.34,0.45,0.6 ..... 0.46,airplane
...

Is there anyone who knows how to Train theano neural net using data in CSV File

Well I think you first need to learn a little bit more about Theano. In a nutshell, in Theano you first define a mathematical model (ie a computational graph) which includes the relationships between variables and operations. Then you input your data into the model and get back the answer.

Just a quick note about your data: remove imgX, from the beginning and ,label at the end. Then create a list y with the length equal to the number of data points you have and put a 1 where there is an airplane and 0 where there is other things.You may take a look at this tutorial to get a better understanding on how to define that computational graph I just talked about.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM