Ask Your Question
0

Can someone explain the output of forward() in DNN module?

asked 2019-02-05 03:40:30 -0500

karan07 gravatar image

The code: predicitions = net.forward(). What output the predictions contain?

edit retag flag offensive close merge delete

Comments

@karan07, Your question looks like Mat img = cv::imread("example.jpg"). What is drawn on the image?. Deep learning networks can solve different problems and prediction interpretation depends on task.

dkurt gravatar imagedkurt ( 2019-02-05 07:19:31 -0500 )edit

For classification - the output is usually a matrix with the probabilities for each class. For regression its usually a single output value of the series of values you want to predict (i.e price of a house). As mentionend by dkurt, the output depends on what your network should do.

holger gravatar imageholger ( 2019-02-05 10:47:45 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2020-12-07 13:00:47 -0500

This is what forward() returns.

conf = inference_results[0, 0, i, 2] # extract the confidence (i.e., probability)

idx = int(inference_results[0, 0, i,1]) # extract the index of the class label

boxPoints = inference_results[0, 0, i, 3:7]

edit flag offensive delete link more
0

answered 2019-02-05 05:24:55 -0500

supra56 gravatar image
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-02-05 03:40:30 -0500

Seen: 4,184 times

Last updated: Feb 05 '19