My cnn accuracy goes down after adding one more featureKeras Maxpooling2d layer gives ValueErrorTheano - CNN generate feature maps after trainingCNN in Keras: unexpected drop of accuracy for small batch sizesPoor accuracy in Tensorflow CNN implementationCNN Model With Low AccuracyError when loading Keras model trained by tensorflowAccuracy in a CNN model never goes high for training and validation setKeras CNN - loss continuously decreases but accuracy converges quicklyLoss of CNN in Keras becomes nan at some point of training'Sequential' object has no attribute 'loss' - When I used GridSearchCV to tuning my Keras model

What is a "tittering order"?

Isn't "Dave's protocol" good if only the database, and not the code, is leaked?

Bootstrap paradox with a time machine in iron

Did Snape really give Umbridge a fake Veritaserum potion that Harry later pretended to drink?

Should I cross-validate metrics that were not optimised?

Phrase origin: "You ain't got to go home but you got to get out of here."

Will greasing clutch parts make it softer

Old story where computer expert digitally animates The Lord of the Rings

Is my background sufficient to start Quantum Computing

C++20 with u8, char8_t and std::string?

How is /a/ pronounced before n/m in French?

My mother co-signed for my car. Can she take it away from me if I am the one making car payments?

Why would a propellor have blades of different lengths?

Did Winston Churchill praise Rolls-Royce engines?

What could a Medieval society do with excess animal blood?

Who are the police in Hong Kong?

Should I cheat if the majority does it?

Can I deep fry food in butter instead of vegetable oil?

3D nonogram – What's going on?

How should characters be punished for failing faction missions?

Does a reference have a storage location?

What can a novel do that film and TV cannot?

Olive oil in Japanese cooking

German idiomatic equivalents of 能骗就骗 (if you can cheat, then cheat)



My cnn accuracy goes down after adding one more feature


Keras Maxpooling2d layer gives ValueErrorTheano - CNN generate feature maps after trainingCNN in Keras: unexpected drop of accuracy for small batch sizesPoor accuracy in Tensorflow CNN implementationCNN Model With Low AccuracyError when loading Keras model trained by tensorflowAccuracy in a CNN model never goes high for training and validation setKeras CNN - loss continuously decreases but accuracy converges quicklyLoss of CNN in Keras becomes nan at some point of training'Sequential' object has no attribute 'loss' - When I used GridSearchCV to tuning my Keras model






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















So I made a CNN that classifies two types of birds, and it worked fine. After that, I tried adding one more type, but I got weird results. I already posted this on ai stack exchange, but they said its better to ask it in here, so I am providing a link to that post.



https://ai.stackexchange.com/q/11444/23452



Here is the model code:



import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D
from tensorflow.keras.callbacks import TensorBoard
import pickle
import time as time

gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction = 0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))

pickle_in = open("C:/Users/Recep/Desktop/programlar/python/X.pickle","rb")
X = pickle.load(pickle_in)
pickle_in = open("C:/Users/Recep/Desktop/programlar/python/Y.pickle","rb")
Y = pickle.load(pickle_in)

X = X/255.0

node_size = 64

model_name = "agi_vs_golden-".format(time.time())


tensorboard = TensorBoard(log_dir='C:/Users/Recep/Desktop/programlar/python/logs/'.format(model_name))
file_writer = tf.summary.FileWriter('C:/Users/Recep/Desktop/programlar/python/logs/'.format(model_name, sess.graph))


model = Sequential()
model.add(Conv2D(node_size,(3,3),input_shape = X.shape[1:]))
#idk what that shape does except that and validation i have no problem
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2,2)))

model.add(Conv2D(node_size,(3,3)))
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2,2)))

model.add(Flatten())

model.add(Dense(node_size))
model.add(Activation("relu"))

model.add(Dense(1))
model.add(Activation("sigmoid"))

model.compile(loss="binary_crossentropy",optimizer="adam",metrics=["accuracy"])

model.fit(X,Y,batch_size=25,epochs=8,validation_split=0.1,callbacks=[tensorboard])
# idk what the validation is and how its used but dont think it caused the problem

model.save("agi_vs_gouldian.model")


By the way, as I said in the comments of my original post, I think maybe there is a lack of training the network, or I don't have the enough data. So I tried increasing the number of epochs. It kinda get the problem, but the part that I'm curious about is what happened when I had the lower epochs?

Can anyone help me?

I am giving the tensor board graphs below.

BTW, is my data array rgb?

And how can I get rid of this local max of %70?

And since I'm a beginner to this, I don't know what validation really works, but I saw that the validation graphs stays the same in the first training that I had issues with.



bach graphsepoch graphsvalidation graphs










share|improve this question
























  • even tough it has a accuracy like %75 at max it doesnt predict correctly the pictures i showed it. Gets maximum of %30 - %40 accuracy

    – Recep uludağ
    Mar 25 at 18:19











  • and if i use lower epochs like up to 10 it gets worse over time but never raising accuracy. But if i give it about 10 it gets better without getting worse. I didnt understand why? and why it is still sucks when it has %70 accuracy

    – Recep uludağ
    Mar 25 at 18:21

















1















So I made a CNN that classifies two types of birds, and it worked fine. After that, I tried adding one more type, but I got weird results. I already posted this on ai stack exchange, but they said its better to ask it in here, so I am providing a link to that post.



https://ai.stackexchange.com/q/11444/23452



Here is the model code:



import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D
from tensorflow.keras.callbacks import TensorBoard
import pickle
import time as time

gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction = 0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))

pickle_in = open("C:/Users/Recep/Desktop/programlar/python/X.pickle","rb")
X = pickle.load(pickle_in)
pickle_in = open("C:/Users/Recep/Desktop/programlar/python/Y.pickle","rb")
Y = pickle.load(pickle_in)

X = X/255.0

node_size = 64

model_name = "agi_vs_golden-".format(time.time())


tensorboard = TensorBoard(log_dir='C:/Users/Recep/Desktop/programlar/python/logs/'.format(model_name))
file_writer = tf.summary.FileWriter('C:/Users/Recep/Desktop/programlar/python/logs/'.format(model_name, sess.graph))


model = Sequential()
model.add(Conv2D(node_size,(3,3),input_shape = X.shape[1:]))
#idk what that shape does except that and validation i have no problem
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2,2)))

model.add(Conv2D(node_size,(3,3)))
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2,2)))

model.add(Flatten())

model.add(Dense(node_size))
model.add(Activation("relu"))

model.add(Dense(1))
model.add(Activation("sigmoid"))

model.compile(loss="binary_crossentropy",optimizer="adam",metrics=["accuracy"])

model.fit(X,Y,batch_size=25,epochs=8,validation_split=0.1,callbacks=[tensorboard])
# idk what the validation is and how its used but dont think it caused the problem

model.save("agi_vs_gouldian.model")


By the way, as I said in the comments of my original post, I think maybe there is a lack of training the network, or I don't have the enough data. So I tried increasing the number of epochs. It kinda get the problem, but the part that I'm curious about is what happened when I had the lower epochs?

Can anyone help me?

I am giving the tensor board graphs below.

BTW, is my data array rgb?

And how can I get rid of this local max of %70?

And since I'm a beginner to this, I don't know what validation really works, but I saw that the validation graphs stays the same in the first training that I had issues with.



bach graphsepoch graphsvalidation graphs










share|improve this question
























  • even tough it has a accuracy like %75 at max it doesnt predict correctly the pictures i showed it. Gets maximum of %30 - %40 accuracy

    – Recep uludağ
    Mar 25 at 18:19











  • and if i use lower epochs like up to 10 it gets worse over time but never raising accuracy. But if i give it about 10 it gets better without getting worse. I didnt understand why? and why it is still sucks when it has %70 accuracy

    – Recep uludağ
    Mar 25 at 18:21













1












1








1








So I made a CNN that classifies two types of birds, and it worked fine. After that, I tried adding one more type, but I got weird results. I already posted this on ai stack exchange, but they said its better to ask it in here, so I am providing a link to that post.



https://ai.stackexchange.com/q/11444/23452



Here is the model code:



import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D
from tensorflow.keras.callbacks import TensorBoard
import pickle
import time as time

gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction = 0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))

pickle_in = open("C:/Users/Recep/Desktop/programlar/python/X.pickle","rb")
X = pickle.load(pickle_in)
pickle_in = open("C:/Users/Recep/Desktop/programlar/python/Y.pickle","rb")
Y = pickle.load(pickle_in)

X = X/255.0

node_size = 64

model_name = "agi_vs_golden-".format(time.time())


tensorboard = TensorBoard(log_dir='C:/Users/Recep/Desktop/programlar/python/logs/'.format(model_name))
file_writer = tf.summary.FileWriter('C:/Users/Recep/Desktop/programlar/python/logs/'.format(model_name, sess.graph))


model = Sequential()
model.add(Conv2D(node_size,(3,3),input_shape = X.shape[1:]))
#idk what that shape does except that and validation i have no problem
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2,2)))

model.add(Conv2D(node_size,(3,3)))
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2,2)))

model.add(Flatten())

model.add(Dense(node_size))
model.add(Activation("relu"))

model.add(Dense(1))
model.add(Activation("sigmoid"))

model.compile(loss="binary_crossentropy",optimizer="adam",metrics=["accuracy"])

model.fit(X,Y,batch_size=25,epochs=8,validation_split=0.1,callbacks=[tensorboard])
# idk what the validation is and how its used but dont think it caused the problem

model.save("agi_vs_gouldian.model")


By the way, as I said in the comments of my original post, I think maybe there is a lack of training the network, or I don't have the enough data. So I tried increasing the number of epochs. It kinda get the problem, but the part that I'm curious about is what happened when I had the lower epochs?

Can anyone help me?

I am giving the tensor board graphs below.

BTW, is my data array rgb?

And how can I get rid of this local max of %70?

And since I'm a beginner to this, I don't know what validation really works, but I saw that the validation graphs stays the same in the first training that I had issues with.



bach graphsepoch graphsvalidation graphs










share|improve this question
















So I made a CNN that classifies two types of birds, and it worked fine. After that, I tried adding one more type, but I got weird results. I already posted this on ai stack exchange, but they said its better to ask it in here, so I am providing a link to that post.



https://ai.stackexchange.com/q/11444/23452



Here is the model code:



import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D
from tensorflow.keras.callbacks import TensorBoard
import pickle
import time as time

gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction = 0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))

pickle_in = open("C:/Users/Recep/Desktop/programlar/python/X.pickle","rb")
X = pickle.load(pickle_in)
pickle_in = open("C:/Users/Recep/Desktop/programlar/python/Y.pickle","rb")
Y = pickle.load(pickle_in)

X = X/255.0

node_size = 64

model_name = "agi_vs_golden-".format(time.time())


tensorboard = TensorBoard(log_dir='C:/Users/Recep/Desktop/programlar/python/logs/'.format(model_name))
file_writer = tf.summary.FileWriter('C:/Users/Recep/Desktop/programlar/python/logs/'.format(model_name, sess.graph))


model = Sequential()
model.add(Conv2D(node_size,(3,3),input_shape = X.shape[1:]))
#idk what that shape does except that and validation i have no problem
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2,2)))

model.add(Conv2D(node_size,(3,3)))
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2,2)))

model.add(Flatten())

model.add(Dense(node_size))
model.add(Activation("relu"))

model.add(Dense(1))
model.add(Activation("sigmoid"))

model.compile(loss="binary_crossentropy",optimizer="adam",metrics=["accuracy"])

model.fit(X,Y,batch_size=25,epochs=8,validation_split=0.1,callbacks=[tensorboard])
# idk what the validation is and how its used but dont think it caused the problem

model.save("agi_vs_gouldian.model")


By the way, as I said in the comments of my original post, I think maybe there is a lack of training the network, or I don't have the enough data. So I tried increasing the number of epochs. It kinda get the problem, but the part that I'm curious about is what happened when I had the lower epochs?

Can anyone help me?

I am giving the tensor board graphs below.

BTW, is my data array rgb?

And how can I get rid of this local max of %70?

And since I'm a beginner to this, I don't know what validation really works, but I saw that the validation graphs stays the same in the first training that I had issues with.



bach graphsepoch graphsvalidation graphs







machine-learning keras neural-network conv-neural-network






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 25 at 20:42









SherylHohman

6,1778 gold badges43 silver badges53 bronze badges




6,1778 gold badges43 silver badges53 bronze badges










asked Mar 25 at 17:56









Recep uludağRecep uludağ

62 bronze badges




62 bronze badges












  • even tough it has a accuracy like %75 at max it doesnt predict correctly the pictures i showed it. Gets maximum of %30 - %40 accuracy

    – Recep uludağ
    Mar 25 at 18:19











  • and if i use lower epochs like up to 10 it gets worse over time but never raising accuracy. But if i give it about 10 it gets better without getting worse. I didnt understand why? and why it is still sucks when it has %70 accuracy

    – Recep uludağ
    Mar 25 at 18:21

















  • even tough it has a accuracy like %75 at max it doesnt predict correctly the pictures i showed it. Gets maximum of %30 - %40 accuracy

    – Recep uludağ
    Mar 25 at 18:19











  • and if i use lower epochs like up to 10 it gets worse over time but never raising accuracy. But if i give it about 10 it gets better without getting worse. I didnt understand why? and why it is still sucks when it has %70 accuracy

    – Recep uludağ
    Mar 25 at 18:21
















even tough it has a accuracy like %75 at max it doesnt predict correctly the pictures i showed it. Gets maximum of %30 - %40 accuracy

– Recep uludağ
Mar 25 at 18:19





even tough it has a accuracy like %75 at max it doesnt predict correctly the pictures i showed it. Gets maximum of %30 - %40 accuracy

– Recep uludağ
Mar 25 at 18:19













and if i use lower epochs like up to 10 it gets worse over time but never raising accuracy. But if i give it about 10 it gets better without getting worse. I didnt understand why? and why it is still sucks when it has %70 accuracy

– Recep uludağ
Mar 25 at 18:21





and if i use lower epochs like up to 10 it gets worse over time but never raising accuracy. But if i give it about 10 it gets better without getting worse. I didnt understand why? and why it is still sucks when it has %70 accuracy

– Recep uludağ
Mar 25 at 18:21












1 Answer
1






active

oldest

votes


















2














You try to classify three birds with sigmoid. Sigmoid is good for binary classification. Try a softmax activation layer and see how it goes. I suggest replacing



model.add(Dense(1))
model.add(Activation("sigmoid"))


with



model.add(Dense(3, activation='softmax'))


Where 3 is the number of birds' type you want to classify.



Have a look here, a very good tutorial of using softmax as the activation layer for a multi-class classification



https://machinelearningmastery.com/multi-class-classification-tutorial-keras-deep-learning-library/






share|improve this answer

























  • And i just remember we are still using binary_crossentropy i guess i need to change it categorical too

    – Recep uludağ
    Mar 26 at 7:11











  • it didnt work because somehow the input array that goes to last dense layer gets downsized to a shape of (1,0) but since we have 3 nodes it expects (3,) size array. So i couldnt find why my array shrinks to 1 size.

    – Recep uludağ
    Mar 26 at 13:10











  • While trying to solve the shape problem i come across the sparse_categorical_crossentropy used it with 3 node softmax and it worked and trained very well but it gives a one hot output array so i looked up in the net and it says u need to use regularization. Will it work? Or fixing the shape and using normal categorical makes more sense?

    – Recep uludağ
    Mar 26 at 13:49











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',
autoActivateHeartbeat: false,
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%2f55343875%2fmy-cnn-accuracy-goes-down-after-adding-one-more-feature%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














You try to classify three birds with sigmoid. Sigmoid is good for binary classification. Try a softmax activation layer and see how it goes. I suggest replacing



model.add(Dense(1))
model.add(Activation("sigmoid"))


with



model.add(Dense(3, activation='softmax'))


Where 3 is the number of birds' type you want to classify.



Have a look here, a very good tutorial of using softmax as the activation layer for a multi-class classification



https://machinelearningmastery.com/multi-class-classification-tutorial-keras-deep-learning-library/






share|improve this answer

























  • And i just remember we are still using binary_crossentropy i guess i need to change it categorical too

    – Recep uludağ
    Mar 26 at 7:11











  • it didnt work because somehow the input array that goes to last dense layer gets downsized to a shape of (1,0) but since we have 3 nodes it expects (3,) size array. So i couldnt find why my array shrinks to 1 size.

    – Recep uludağ
    Mar 26 at 13:10











  • While trying to solve the shape problem i come across the sparse_categorical_crossentropy used it with 3 node softmax and it worked and trained very well but it gives a one hot output array so i looked up in the net and it says u need to use regularization. Will it work? Or fixing the shape and using normal categorical makes more sense?

    – Recep uludağ
    Mar 26 at 13:49
















2














You try to classify three birds with sigmoid. Sigmoid is good for binary classification. Try a softmax activation layer and see how it goes. I suggest replacing



model.add(Dense(1))
model.add(Activation("sigmoid"))


with



model.add(Dense(3, activation='softmax'))


Where 3 is the number of birds' type you want to classify.



Have a look here, a very good tutorial of using softmax as the activation layer for a multi-class classification



https://machinelearningmastery.com/multi-class-classification-tutorial-keras-deep-learning-library/






share|improve this answer

























  • And i just remember we are still using binary_crossentropy i guess i need to change it categorical too

    – Recep uludağ
    Mar 26 at 7:11











  • it didnt work because somehow the input array that goes to last dense layer gets downsized to a shape of (1,0) but since we have 3 nodes it expects (3,) size array. So i couldnt find why my array shrinks to 1 size.

    – Recep uludağ
    Mar 26 at 13:10











  • While trying to solve the shape problem i come across the sparse_categorical_crossentropy used it with 3 node softmax and it worked and trained very well but it gives a one hot output array so i looked up in the net and it says u need to use regularization. Will it work? Or fixing the shape and using normal categorical makes more sense?

    – Recep uludağ
    Mar 26 at 13:49














2












2








2







You try to classify three birds with sigmoid. Sigmoid is good for binary classification. Try a softmax activation layer and see how it goes. I suggest replacing



model.add(Dense(1))
model.add(Activation("sigmoid"))


with



model.add(Dense(3, activation='softmax'))


Where 3 is the number of birds' type you want to classify.



Have a look here, a very good tutorial of using softmax as the activation layer for a multi-class classification



https://machinelearningmastery.com/multi-class-classification-tutorial-keras-deep-learning-library/






share|improve this answer















You try to classify three birds with sigmoid. Sigmoid is good for binary classification. Try a softmax activation layer and see how it goes. I suggest replacing



model.add(Dense(1))
model.add(Activation("sigmoid"))


with



model.add(Dense(3, activation='softmax'))


Where 3 is the number of birds' type you want to classify.



Have a look here, a very good tutorial of using softmax as the activation layer for a multi-class classification



https://machinelearningmastery.com/multi-class-classification-tutorial-keras-deep-learning-library/







share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 25 at 20:37

























answered Mar 25 at 20:28









aliftalift

3252 silver badges16 bronze badges




3252 silver badges16 bronze badges












  • And i just remember we are still using binary_crossentropy i guess i need to change it categorical too

    – Recep uludağ
    Mar 26 at 7:11











  • it didnt work because somehow the input array that goes to last dense layer gets downsized to a shape of (1,0) but since we have 3 nodes it expects (3,) size array. So i couldnt find why my array shrinks to 1 size.

    – Recep uludağ
    Mar 26 at 13:10











  • While trying to solve the shape problem i come across the sparse_categorical_crossentropy used it with 3 node softmax and it worked and trained very well but it gives a one hot output array so i looked up in the net and it says u need to use regularization. Will it work? Or fixing the shape and using normal categorical makes more sense?

    – Recep uludağ
    Mar 26 at 13:49


















  • And i just remember we are still using binary_crossentropy i guess i need to change it categorical too

    – Recep uludağ
    Mar 26 at 7:11











  • it didnt work because somehow the input array that goes to last dense layer gets downsized to a shape of (1,0) but since we have 3 nodes it expects (3,) size array. So i couldnt find why my array shrinks to 1 size.

    – Recep uludağ
    Mar 26 at 13:10











  • While trying to solve the shape problem i come across the sparse_categorical_crossentropy used it with 3 node softmax and it worked and trained very well but it gives a one hot output array so i looked up in the net and it says u need to use regularization. Will it work? Or fixing the shape and using normal categorical makes more sense?

    – Recep uludağ
    Mar 26 at 13:49

















And i just remember we are still using binary_crossentropy i guess i need to change it categorical too

– Recep uludağ
Mar 26 at 7:11





And i just remember we are still using binary_crossentropy i guess i need to change it categorical too

– Recep uludağ
Mar 26 at 7:11













it didnt work because somehow the input array that goes to last dense layer gets downsized to a shape of (1,0) but since we have 3 nodes it expects (3,) size array. So i couldnt find why my array shrinks to 1 size.

– Recep uludağ
Mar 26 at 13:10





it didnt work because somehow the input array that goes to last dense layer gets downsized to a shape of (1,0) but since we have 3 nodes it expects (3,) size array. So i couldnt find why my array shrinks to 1 size.

– Recep uludağ
Mar 26 at 13:10













While trying to solve the shape problem i come across the sparse_categorical_crossentropy used it with 3 node softmax and it worked and trained very well but it gives a one hot output array so i looked up in the net and it says u need to use regularization. Will it work? Or fixing the shape and using normal categorical makes more sense?

– Recep uludağ
Mar 26 at 13:49






While trying to solve the shape problem i come across the sparse_categorical_crossentropy used it with 3 node softmax and it worked and trained very well but it gives a one hot output array so i looked up in the net and it says u need to use regularization. Will it work? Or fixing the shape and using normal categorical makes more sense?

– Recep uludağ
Mar 26 at 13:49







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55343875%2fmy-cnn-accuracy-goes-down-after-adding-one-more-feature%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

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해