Fix a ValueError inside a machine learning program built with Keras

In [login to view URL] from Model_v2 in the attachment, I got the following error :

ValueError: Error when checking target: expected activation_4 to have shape (3,) but got array with shape (2,)

You can look at the photo in the attachment, i.e. [login to view URL]

I changed the line 25 in [login to view URL] to get the labels ['1', '0', '-1'] instead of ['1', '-1']

How can I fix it?

Skills: Machine Learning, Python

See more: freelancer machine learning, machine learning vancouver, freelance machine learning, python, machine learning, machine learning companies vancouver, photo look line drawn art, machine learning mehreen, making photo look hand drawn, want edit photo look funny, photo look stamp photoshop, slot machine java program project, fix object expected error, making photo look drawn, photo look vector graphic, quick program built zend diagram files, horizontal photo look, machine learning thesis, machine learning freelance, machine learning statistical nlp option

About the Employer:
( 67 reviews ) Ste-Julie, Canada

Project ID: #17404628

Awarded to:


The error in the program seems to be a mismatch in the model output size and the size of the provided training data. This can be solved by modifying the model, or the training data. Relevant Skills and Experience Deep More

$180 CAD in 3 days
(6 Reviews)

20 freelancers are bidding on average $166 for this job


Dear client I have checked your proposal. As a python expert, i can help you well. Relevant Skills and Experience I have many good experiences in python field. Proposed Milestones $250 CAD - good job Please contact More

$250 CAD in 3 days
(91 Reviews)

You need to change the dimensions of the neural network model built.I am speaking about the initialisation part where you define the number of layers and inputs Relevant Skills and Experience 4 years of experience as More

$250 CAD in 3 days
(37 Reviews)

Hello, there, I am very happy to put my bid on your project. Relevant Skills and Experience I am an expert of machine learning algorithm and senior python developer, so I am interested in and confident to do this proj More

$150 CAD in 3 days
(59 Reviews)

Hi, there - My name is Phong. I have read your job description and I am very interested in this project. Relevant Skills and Experience I have 7+ years experience in python programming and machine learning algorithm(k More

$150 CAD in 3 days
(31 Reviews)

I am a professional ML/NLP Engineer in an IT company with 3+ years of Python, Machine learning and Natural Language processing, have experience working with many challenging problems Relevant Skills and Experience al More

$155 CAD in 3 days
(41 Reviews)

Hi there, I would like to be considered for your project. I have 2+ years of experience in Neural Networks specially in Keras. I'll be glad to help. Best regards, Andrew Relevant Skills and Experience Keras Neural N More

$50 CAD in 1 day
(36 Reviews)

Hi Sir. Relevant Skills and Experience I already debugged your code, and it needs database. Please give me your database sql. Then I can fix your problem perfectly. Looking forward your interview. Regards. Proposed More

$222 CAD in 3 days
(15 Reviews)

sure, do let's share the code. will tell you the debug

$166 CAD in 3 days
(32 Reviews)

View my last projects based on Data Mining, Machine Learning, Artificial Intelligence, python, java and I can complete your project perfectly. Relevant Skills and Experience More

$250 CAD in 7 days
(8 Reviews)
$30 CAD in 0 days
(17 Reviews)

I have a team of Machine Learning and Python developers with 5+ years of experience. Relevant Skills and Experience We have an experience with Tensor flow and other Machine Learning techniques. We can do that. Propos More

$188 CAD in 3 days
(3 Reviews)

Feel fee to contact me for Fix a [login to view URL] me message to discuss further more details Relevant Skills and Experience .Machine Learning, Python Proposed Milestones $150 CAD - Fix a ValueError Stay tuned, I'm More

$150 CAD in 3 days
(11 Reviews)

change keras script Relevant Skills and Experience python keras Proposed Milestones $155 CAD - complete

$155 CAD in 1 day
(10 Reviews)

Professional Keras & Programming Expert Relevant Skills and Experience Keras, Tensorflow Proposed Milestones $250 CAD - Full work

$250 CAD in 3 days
(10 Reviews)

Hello, i have read the details provided..please contact me to discuss more on the project deadline and some other few things Relevant Skills and Experience Machine Learning, Python Proposed Milestones $155 CAD - .

$155 CAD in 3 days
(8 Reviews)

I think there is some mismatch in input or output shape in your model If you extract some of your data and send me, so I can reproduce your error Relevant Skills and Experience I have experience in training some pytho More

$100 CAD in 3 days
(1 Review)
$222 CAD in 3 days
(0 Reviews)

This Issue does not seem to be big issue as i have been working in this since long, I want script and some more details or specific requirements if any . I would love to get a reply from you. Relevant Skills and Exper More

$144 CAD in 3 days
(0 Reviews)

Dear Madam/Sir, The problem is that you have the wrong shape in your data. The data must be reshaped in order not to have this problem. Look forward to working with you. Relevant Skills and Experience In my diploma More

$111 CAD in 5 days
(0 Reviews)