Asked 9th Oct, 2020

How to get predicted output values from Trained neural network?

I trained artificial neural network with 11 inputs and one output. There are total 74 data. I need to compare the predicted values with values calculated from equations of design codes. So can someone help me how can I get the predicted output

Most recent answer

All Answers (4)

9th Oct, 2020
Mohammad Al-Fawa'reh
Yarmouk University
if you are dealing with predication use the following piece of code in python :
a=[] for i in range(13623):        test_data = np.array(X[i])     w=model.predict(test_data.reshape(1,4), batch_size=1)     a.append(w)
actual_val[] for i in range(13623):        d=Y[i]    actual.append(d)
where X: input , Y : output
if you do not get it contact me to share with you the full code.
10th Oct, 2020
Faisal Hussain
Al-Khawarizmi Institute of Computer Science (KICS) Lahore Pakistan
If you are working in python and using Tensorflow 2.x, then first load the trained/saved model into a variable say (model1). Then you can get NN model predictions using model1.predict() function:
modelPredictions = model1.predict(samples_to_predict)
print(modelPredictions )
10th Oct, 2020
Shreyas Alagundi
National Institute of Technology Karnataka
Thanks for your time.. I am working in MATLAB not Python. Actully i used net(input value); One matrix named 'ans' has created in workspace. i hope this is the output values but i am wondering is this correct..

Similar questions and discussions

Related Publications

Got a technical question?
Get high-quality answers from experts.