How to increase model's efficiency using CNN











up vote
-1
down vote

favorite












I'm using normalized data ranging [-1,1]. I have to used 1 dimensional convolution. But my model is only showing 74 percent training and test accuracy. I want to increase this accuracy. I have increases the amount of input data and and tried to add 2 convolution layer but still there is no effect on accuracy. I have to classify data into two classes. Can someone please guide me what should I do to increase accuracy. Or suggest some CNN network that is using data [-1,1]. Moreover should I add more fully connected layer or should I increase convolutional layers which will be more effective?



input = tf.reshape(x, [-1, FLAGS.image_width, FLAGS.input_channel])
filter = weight_variable([FLAGS.filter_width, FLAGS.input_channel,
FLAGS.filter_channel])

conv_out = tf.nn.tanh(conv1d(input, filter))
pool_out = pool(conv_out2)
dim = pool_out.get_shape().as_list()

conv_re = tf.reshape(pool_out, (-1, dim[1]*dim[2]))
W_fc = weight_variable([dim[1]*dim[2], 2])
logits = tf.matmul(conv_re, W_fc)
y_prime = tf.nn.softmax(logits)

cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=logits,
labels= y_)
loss = tf.reduce_mean(cross_entropy)
optimizer = tf.train.GradientDescentOptimizer(FLAGS.rLearn).minimize(loss)









share|improve this question




























    up vote
    -1
    down vote

    favorite












    I'm using normalized data ranging [-1,1]. I have to used 1 dimensional convolution. But my model is only showing 74 percent training and test accuracy. I want to increase this accuracy. I have increases the amount of input data and and tried to add 2 convolution layer but still there is no effect on accuracy. I have to classify data into two classes. Can someone please guide me what should I do to increase accuracy. Or suggest some CNN network that is using data [-1,1]. Moreover should I add more fully connected layer or should I increase convolutional layers which will be more effective?



    input = tf.reshape(x, [-1, FLAGS.image_width, FLAGS.input_channel])
    filter = weight_variable([FLAGS.filter_width, FLAGS.input_channel,
    FLAGS.filter_channel])

    conv_out = tf.nn.tanh(conv1d(input, filter))
    pool_out = pool(conv_out2)
    dim = pool_out.get_shape().as_list()

    conv_re = tf.reshape(pool_out, (-1, dim[1]*dim[2]))
    W_fc = weight_variable([dim[1]*dim[2], 2])
    logits = tf.matmul(conv_re, W_fc)
    y_prime = tf.nn.softmax(logits)

    cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=logits,
    labels= y_)
    loss = tf.reduce_mean(cross_entropy)
    optimizer = tf.train.GradientDescentOptimizer(FLAGS.rLearn).minimize(loss)









    share|improve this question


























      up vote
      -1
      down vote

      favorite









      up vote
      -1
      down vote

      favorite











      I'm using normalized data ranging [-1,1]. I have to used 1 dimensional convolution. But my model is only showing 74 percent training and test accuracy. I want to increase this accuracy. I have increases the amount of input data and and tried to add 2 convolution layer but still there is no effect on accuracy. I have to classify data into two classes. Can someone please guide me what should I do to increase accuracy. Or suggest some CNN network that is using data [-1,1]. Moreover should I add more fully connected layer or should I increase convolutional layers which will be more effective?



      input = tf.reshape(x, [-1, FLAGS.image_width, FLAGS.input_channel])
      filter = weight_variable([FLAGS.filter_width, FLAGS.input_channel,
      FLAGS.filter_channel])

      conv_out = tf.nn.tanh(conv1d(input, filter))
      pool_out = pool(conv_out2)
      dim = pool_out.get_shape().as_list()

      conv_re = tf.reshape(pool_out, (-1, dim[1]*dim[2]))
      W_fc = weight_variable([dim[1]*dim[2], 2])
      logits = tf.matmul(conv_re, W_fc)
      y_prime = tf.nn.softmax(logits)

      cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=logits,
      labels= y_)
      loss = tf.reduce_mean(cross_entropy)
      optimizer = tf.train.GradientDescentOptimizer(FLAGS.rLearn).minimize(loss)









      share|improve this question















      I'm using normalized data ranging [-1,1]. I have to used 1 dimensional convolution. But my model is only showing 74 percent training and test accuracy. I want to increase this accuracy. I have increases the amount of input data and and tried to add 2 convolution layer but still there is no effect on accuracy. I have to classify data into two classes. Can someone please guide me what should I do to increase accuracy. Or suggest some CNN network that is using data [-1,1]. Moreover should I add more fully connected layer or should I increase convolutional layers which will be more effective?



      input = tf.reshape(x, [-1, FLAGS.image_width, FLAGS.input_channel])
      filter = weight_variable([FLAGS.filter_width, FLAGS.input_channel,
      FLAGS.filter_channel])

      conv_out = tf.nn.tanh(conv1d(input, filter))
      pool_out = pool(conv_out2)
      dim = pool_out.get_shape().as_list()

      conv_re = tf.reshape(pool_out, (-1, dim[1]*dim[2]))
      W_fc = weight_variable([dim[1]*dim[2], 2])
      logits = tf.matmul(conv_re, W_fc)
      y_prime = tf.nn.softmax(logits)

      cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=logits,
      labels= y_)
      loss = tf.reduce_mean(cross_entropy)
      optimizer = tf.train.GradientDescentOptimizer(FLAGS.rLearn).minimize(loss)






      tensorflow machine-learning






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 at 14:20









      desertnaut

      15.3k53361




      15.3k53361










      asked Nov 19 at 13:54









      R.joe

      66




      66





























          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53376139%2fhow-to-increase-models-efficiency-using-cnn%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53376139%2fhow-to-increase-models-efficiency-using-cnn%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Wiesbaden

          Marschland

          Dieringhausen