Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. % Scalogram
  2. Fs = 10000;
  3. filb = cwtfilterbank('SignalLength',10000,'SamplingFrequency',Fs,...
  4. 'VoicesPerOctave',12);
  5. sg = vibhistory.data(1,1:10000);
  6. [cfs,freq] = wt(filb,sg);
  7. t = (0:9999)/Fs;
  8. figure;
  9. pcolor(t,freq,abs(cfs));
  10. % GoogLeNet
  11. rng default
  12. [imgTr,imgVal] = splitEachLabel(allImg,0.8,'randomized');
  13. net = googlenet;
  14. lgraph = layerGraph(net);
  15. options = trainingOptions('sgdm',...
  16. 'MiniBatchSize',15,...
  17. 'MaxEpochs',120,...
  18. 'InitialLearnRate',1e-4,...
  19. 'ValidationData',imgVal,...
  20. 'ValidationFrequency',10,...
  21. 'Verbose',1,...
  22. 'ExecutionEnvironment','cpu',...
  23. 'Plots','training-progress');
  24. rng default
  25. mygn = trainNetwork(imgTr,lgraph,options);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement