xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 1.13MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-11-18
  • 語(yǔ)言: Matlab
  • 標(biāo)簽: deeple??

資源簡(jiǎn)介

MATLAB代碼,里面包括代碼運(yùn)行的相關(guān)變量以及提供了下載數(shù)據(jù)的鏈接,可以通過代碼直接下載數(shù)據(jù),方便閱讀。

資源截圖

代碼片段和文件信息

%%?Deep?learning?for?classification?on?the?MNIST?dataset
%?Copyright?2018?The?MathWorks?Inc.

%%?Prepare?the?dataset
%準(zhǔn)備數(shù)據(jù)集
%?The?MNIST?dataset?is?a?set?of?handwritten?digits?categorized?0-9?and?is
%?available?at?http://yann.lecun.com/exdb/mnist/.

%MNIST數(shù)據(jù)集是一組手寫數(shù)字,分類為0-9,可以在http://yann.lecun.com/exdb/mnist/上找到。

%?The?following?line?will?download?(if?necessary)?and?prepare?the?dataset
%?to?use?in?MATLAB.

%如有必要,下面的代碼行將下載并準(zhǔn)備好在MATLAB中使用的數(shù)據(jù)集。
[imgDataTrain?labelsTrain?imgDataTest?labelsTest]?=?prepareData;

%%?Let‘s?look?at?a?few?of?the?images
%讓我們看一些圖片
%?Randomize?the?images?for?display
%隨機(jī)顯示圖像
warning?off?images:imshow:magnificationMustBeFitForDockedFigure
perm?=?randperm(numel(labelsTrain)?25);
subset?=?imgDataTrain(::1perm);
montage(subset)

%%?How?do?we?classify?a?digit?
%我們?nèi)绾螌?duì)數(shù)字進(jìn)行分類?
%?First?we?need?a?model?-?let‘s?load?one
load?MNISTModel

%?Predict?the?class?of?an?image
%預(yù)測(cè)圖像的類別
randIndx?=?randi(numel(labelsTest));
img?=?imgDataTest(::1randIndx);
actualLabel?=?labelsTest(randIndx);

predictedLabel?=?net.classify(img);
imshow(img);
title([‘Predicted:?‘?char(predictedLabel)?‘?Actual:?‘?char(actualLabel)])

%%?Need?a?starting?point??Check?the?documentation!
%需要一個(gè)起點(diǎn)?檢查文檔!
%?search?“deep?learning“
%搜索“深度學(xué)習(xí)”
web(fullfile(docroot?‘nnet/deep-learning-training-from-scratch.html‘))


%%?Prepare?the?CNN
%?One?of?the?simplest?possible?convnets?it?contains?one?convolutional
%?layer?one?ReLU?one?pooling?layer?and?one?fully?connected?layer
%一個(gè)最簡(jiǎn)單的卷積網(wǎng)絡(luò),它包含一個(gè)卷積層,一個(gè)ReLU,一個(gè)池化層,和一個(gè)完全連接的層
layers?=?[??imageInputlayer([28?28?1])
????????????convolution2dlayer(520)
????????????relulayer
????????????maxPooling2dlayer(2?‘Stride‘?2)
????????????fullyConnectedlayer(10)
????????????softmaxlayer
????????????classificationlayer()???]
????????
%%?Attempt?1:?Set?training?options?and?train?the?network
%%嘗試1:設(shè)置訓(xùn)練選項(xiàng)并訓(xùn)練網(wǎng)絡(luò)
????
????miniBatchSize?=?8192;
????options?=?trainingOptions(?‘sgdm‘...
????????‘MiniBatchSize‘?miniBatchSize...
????????‘Plots‘?‘training-progress‘);

????net?=?trainNetwork(imgDataTrain?labelsTrain?layers?options);
????

%%?Attempt?2:?Change?the?learning?rate
%嘗試2:改變學(xué)習(xí)速度

????options?=?trainingOptions(?‘sgdm‘...
????????‘MiniBatchSize‘?miniBatchSize...
????????‘Plots‘?‘training-progress‘...
????????‘InitialLearnRate‘?0.0001);

????net?=?trainNetwork(imgDataTrain?labelsTrain?layers?options);

%%?Attempt?3:?Change?the?network?architecture
%嘗試3:更改網(wǎng)絡(luò)架構(gòu)
layers?=?[
????imageInputlayer([28?28?1])

????convolution2dlayer(316‘Padding‘1)
????batchNormalizationlayer
????relulayer

????maxPooling2dlayer(2‘Stride‘2)

????convolution2dlayer(332‘Padding‘1)
????batchNormalizationlayer
????relulayer

????maxPooling2dlayer(2‘Stride‘2)

????convolution2dlayer(364‘Padding‘1)
????batchNormalizationlayer
????relulayer

????fullyConnectedlayer(10)
????softmaxlayer
????classificationlayer];

????options?=?trainingOptions(?‘sgdm‘

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件????????505??2018-05-02?10:43??Demo1_MNIST\letterW.png

?????文件?????211842??2018-05-02?10:43??Demo1_MNIST\MNISTModel.mat

?????文件???????3727??2019-04-24?11:25??Demo1_MNIST\MNIST_Classification_Demo.m

?????文件?????828512??2018-05-02?10:43??Demo1_MNIST\MNIST_Classification_Demo_Live.html

?????文件?????503833??2018-05-02?10:43??Demo1_MNIST\MNIST_Classification_Demo_Live.mlx

?????文件???????3508??2019-04-24?10:20??Demo1_MNIST\prepareData.m

?????目錄??????????0??2019-04-25?11:14??Demo1_MNIST

-----------?---------??----------?-----??----

??????????????1551927????????????????????7


評(píng)論

共有 條評(píng)論