<< Deep Learning Deep Learning dnn_getparam >>

IPCV >> Deep Learning > dnn_forward

dnn_forward

Runs forward pass to compute output of layer with name layer_name

Syntax

out = dnn_forward(net,img,scalefactor,image_size,rgb_mean,swapRB,layer_name);

Parameters

net :

DNN object loaded in Scilab

img :

Image in Scilab format

input_size :

DNN input size

layer_name :

Name for layer which output is needed to get

scalefactor :

Spatial size for input image

rgb_mean :

Scalar with mean values which are subtracted from channels. Values are intended to be in (mean-R, mean-G, mean-B) order if image has BGR ordering and swapRB is true.

swapRB :

Flag which indicates that swap first and last channels in 3-channel image is necessary.

crop :

flag which indicates whether image will be cropped after resize or not

out :

Output matrix of the results depending on the type of DNN loaded.

Description

This function is used to run forward pass to compute output of layer with name layer_name

Examples

dnn_path = fullfile(getIPCVpath(),'images','dnn');
net = dnn_readmodel(fullfile(dnn_path,'lenet5.pb'),'','tensorflow');
S = imread(fullfile(dnn_path,'3.jpg'));
imshow(S);
out = dnn_forward(net,~S,[28,28]);
[maxV,maxI]=max(out);
xnumb(10,10,maxI-1);
e = gce();
e.font_size = 10;
e.font_color = 5;

See also

Authors


Report an issue
<< Deep Learning Deep Learning dnn_getparam >>