How to add HOG feature to the following code

1 次查看(过去 30 天)
Here is the code for the neural network, "Latest.mat" contains training and test images for the neural network,
  • I need to see the accuracy and
  • I need to add "HOG feature" and using that i need to compare between the training and the test images, Please can anyone help me with that please
clc; clear all;
%%
load latest.mat; trainFcn = 'trainscg'; % Scaled conjugate gradient backpropagation.
net.performFcn = 'mse'; %newly added
hiddenLayerSize = 100; %net = patternnet(hiddenLayerSize); net=feedforwardnet([20 10]);
view (net); net.divideParam.trainRatio = 70/100; net.divideParam.valRatio = 15/100; net.divideParam.testRatio = 15/100;
net.trainParam.epochs = 100;
[net,tr] = train(net,training,test); y = net(training); e = gsubtract(test,y); performance = perform(net,test,y) tind = vec2ind(test); yind = vec2ind(y); percentErrors = sum(tind ~= yind)/numel(tind);
%net.IW{1,1}; %net.b{1}; %net.LW {1};
% View the Network view(net)
Thank You
  6 个评论
Greg Heath
Greg Heath 2017-4-25
The fudamental role of the validation subset is clearly explained in the documentation.
You can also search both the NEWSGROUP and ANSWERS using the search word
validation
Hope this helps.
Greg
Tousif Ahmed
Tousif Ahmed 2017-4-26
https://in.mathworks.com/matlabcentral/answers/58761-nn-validation-and-data-partition
I followed the above link..
Can you please help me in my code with the validation set please

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by