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)
tensorflow machine-learning
add a comment |
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)
tensorflow machine-learning
add a comment |
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)
tensorflow machine-learning
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
tensorflow machine-learning
edited Nov 19 at 14:20
desertnaut
15.3k53361
15.3k53361
asked Nov 19 at 13:54
R.joe
66
66
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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