1

I have a 2-class classification problem in hand. I have extracted a set of 3 features for each training example .. I am planning to use a very simple CNN to learn the weights. My model looks likeenter image description here

I am planning to use tensorflow for implementing this CNN in python. The official tutorial https://www.tensorflow.org/tutorials/deep_cnn/ seems to be somewhat abstract . Can I get a basic code to train this?

2
  • Are you trying to understand CNN by implementing this? If so, you can take any data set from data.world and use it to experiment. Commented Jan 14, 2017 at 11:05
  • I am infact trying to understand CNN and machine learning in general . I dont have a problem with dataset . From the accepted answer , I guess keras does the task Commented Jan 15, 2017 at 12:02

1 Answer 1

4

You seem to be missing the point of CNN, which require signal with spatial relations (such as raw images, audio, etc.). Convolving signal with three features makes pretty much no sense (pretty much the only option would be a 2x1 filter convolving among the only axis, leading to nearly regular MLP). What you are looking for is rather basic classifier, and in general - neural nets are probably not the good choice (they are not good models for small, low-dimensional problems), you should be fine with models like kernelized SVM, and other classifiers which are available in scikit-learn. For basic TF code look at its basic tutorial, since as said before - this is not a problem for CNN. Furthermore, TF is not a simple library which trains a model in few lines of code, if you are looking for this kind of things you should rather take a look at keras, tf-slim or other libraries built on top of TF.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you . That pretty much summarizes what I am looking for

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.