zoukankan      html  css  js  c++  java
  • alexNet--deep learning--alexNet的11行代码

    % Copyright 2016 The MathWorks, Inc.

    clear

    camera = webcam(  2  ); % Connect to the camera
    nnet = alexnet ;  % Load the neural net
    nnet.Layers
    return;

    while true  
        picture = camera.snapshot;              % Take a picture   
        picture = imresize(picture,[227,227]);  % Resize the picture

        label = classify(nnet, picture);        % Classify the picture
          
        image(picture);     % Show the picture
        title(char(label)); % Show the label
        drawnow;  
    end

     webcam_object_classification

    ans =

      25x1 Layer array with layers:

         1   'data'     Image Input                   227x227x3 images with 'zerocenter' normalization
         2   'conv1'    Convolution                   96 11x11x3 convolutions with stride [4  4] and padding [0  0]
         3   'relu1'    ReLU                          ReLU
         4   'norm1'    Cross Channel Normalization   cross channel normalization with 5 channels per element
         5   'pool1'    Max Pooling                   3x3 max pooling with stride [2  2] and padding [0  0]
         6   'conv2'    Convolution                   256 5x5x48 convolutions with stride [1  1] and padding [2  2]
         7   'relu2'    ReLU                          ReLU
         8   'norm2'    Cross Channel Normalization   cross channel normalization with 5 channels per element
         9   'pool2'    Max Pooling                   3x3 max pooling with stride [2  2] and padding [0  0]
        10   'conv3'    Convolution                   384 3x3x256 convolutions with stride [1  1] and padding [1  1]
        11   'relu3'    ReLU                          ReLU
        12   'conv4'    Convolution                   384 3x3x192 convolutions with stride [1  1] and padding [1  1]
        13   'relu4'    ReLU                          ReLU
        14   'conv5'    Convolution                   256 3x3x192 convolutions with stride [1  1] and padding [1  1]
        15   'relu5'    ReLU                          ReLU
        16   'pool5'    Max Pooling                   3x3 max pooling with stride [2  2] and padding [0  0]
        17   'fc6'      Fully Connected               4096 fully connected layer
        18   'relu6'    ReLU                          ReLU
        19   'drop6'    Dropout                       50% dropout
        20   'fc7'      Fully Connected               4096 fully connected layer
        21   'relu7'    ReLU                          ReLU
        22   'drop7'    Dropout                       50% dropout
        23   'fc8'      Fully Connected               1000 fully connected layer
        24   'prob'     Softmax                       softmax
        25   'output'   Classification Output         cross-entropy with 'tench', 'goldfish', and 998 other classes
    >>

  • 相关阅读:
    最主要的商业模式
    Linux-清除rootpassword
    Drupal 关于节点(nodes)的理解
    hdu4240 求一条流量最大的路/(此题网上百分之90以上算法是错误的)
    LeetCode Next Permutation
    关于使用strtok的一个小问题
    SDUT--Pots(二维BFS)
    微信 小程序组件 滑动导航和获取元素实际高度
    微信 小程序组件 电话
    微信小程序组件 客服
  • 原文地址:https://www.cnblogs.com/leoking01/p/7001473.html
Copyright © 2011-2022 走看看