Coder Social home page Coder Social logo

afagarap / cnn-svm Goto Github PK

View Code? Open in Web Editor NEW
336.0 11.0 127.0 64.65 MB

An Architecture Combining Convolutional Neural Network (CNN) and Linear Support Vector Machine (SVM) for Image Classification

Home Page: https://arxiv.org/abs/1712.03541

License: Apache License 2.0

Python 98.53% Shell 1.47%
artificial-intelligence artificial-neural-networks classification convolutional-neural-networks deep-learning machine-learning support-vector-machine supervised-learning softmax-layer tensorflow

cnn-svm's People

Contributors

afagarap avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cnn-svm's Issues

Some questions about the code of the svm prediction part

This is the predicted output part of the svm network:
output = tf.identity(tf.sign(output), name='prediction')
correct_prediction = tf.equal(tf.argmax(output, 1), tf.argmax(y_input, 1))

After the output is processed by the function tf.sign(),a two-category tag that is processed into (1,-1).This is not predictable for multi-class handwritten data sets.
I want to ask you this question.

Not able to create diretcory

Hello i have tried to run your code but it is not able to create log directory. i have created manually and pass path of that but then also it is showing the same error.
"tensorflow.python.framework.errors_impl.InvalidArgumentError: Failed to create a directory: C:/Users/Anamika/Downloads/cnn-svm-master/cnn-svm-master/logsThu Aug 9 18:32:45 2018-training; Invalid argument"

max nargin decision problem in code

In cnn-svm/model/cnn_svm.py , output of one versus rest svm is written as :
output = tf.identity(tf.sign(output), name='prediction')
correct_prediction = tf.equal(tf.argmax(output, 1), tf.argmax(y_input, 1))

tf.sign(output) seems incorrect. It should be removed. SVM here use max margin decision. When output margins of multiple binary linear SVM is converted to 1 and -1, tf.argmax(output, 1) may return a false value, because more than one binary linear SVM's output may be converted to 1 as they may all output a positive margin.

ModuleNotFoundError: No module named 'tensorflow.examples'

Hi,

I cant run the code with the following command:
python3 main.py --model 2 --dataset ./MNIST_data --penalty_parameter 1 --checkpoint_path ./checkpoint --log_path ./logs
I would get the error below:
"ModuleNotFoundError: No module named 'tensorflow.examples'"

How can I solve the Issue?

Can't run the training on the model for CNNSVM

Hi, I am trying to run the code however I am getting this error.

InvalidArgumentError: You must feed a value for placeholder tensor 'input_4/x_input' with dtype float and shape [?,784]
[[{{node input_4/x_input}}]]

pt_cnn_svm

Why didn't you provide the hinge loss version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.