Abstract

We present a class of efficient models called MobileNets for mobile and embedded vision applications. MobileNets are based on a streamlined architecture that uses depthwise separable convolutions to build light weight deep neural networks. We introduce two simple global hyper-parameters that efficiently trade off between latency and accuracy. These hyper-parameters allow the model builder to choose the right sized model for their application based on the constraints of the problem. We present extensive experiments on resource and accuracy tradeoffs and show strong performance compared to other popular models on ImageNet classification. We then demonstrate the effectiveness of MobileNets across a wide range of applications and use cases including object detection, finegrain classification, face attributes and large scale geo-localization.


임베디드 비전 앱과 모바일을 위한 효율적인 모델인 MobileNet을 소개한다. 

MobileNet은 경량 심층신경망으로 구성된 깊이방향으로 분리가능한 합성곱을 사용한 간소화된 아키텍처이다.

지연속도(latency)와 정확도(accuracy)를 효율적으로 조정 가능한 두가지 global hyper-parameter를 소개한다.

이 두 매개변수는 모델 개발자가 문제의 제약에 따라 적합한 크기의 모델을 택할 수 있게 해준다.

우리는 자원과 정확도의 trade-off관계에 대해 많은 실험을 하였고, ImageNet 분류문제에서 다른 저명한 모델과 비교하여 좋은 성능을 보였다.

object detection, fine grain classification, face attributes and large scale geo-loc를 포함한 다양한 애플리케이션에서의 효율성을 증명한다.

 

Reference

Howard, A. G., Zhu, M., Chen, B., Kalenichenko, D., Wang, W., Weyand, T., ... & Adam, H. (2017). Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861.

본 글은 이산형을 기준으로 합니다.

 

기댓값 : 각 값과 확률의 곱

분산 : 각 분포의 값이 평균으로부터 떨어져 있는 정도 

: E(X-E(X))^2

제곱인 이유 : 선형성에 의해 E(X-E(X))는 0 이 된다. 이를 해결하기 위해 절댓값을 씌워주면 되지만 '연속 가능한' 이라는 특징을 잃어버리기 떄문에 제곱을 씌워주게 된다

표준편차 : 분산의 제곱근

: 분산을 제곱하면 본 단위를 잃기 때문에 다시 제곱근을 해주어 원단위를 다시 찾아오게 하기 위함.

: 분산이 마일이라면 제곱하면 마일의 제곱이기 떄문에 내가 원하는 마일이 아니다 따라서 제곱근을 씌워주워 마일로 다시 바꿔준다.

 

Reference

https://m.blog.naver.com/PostView.nhn?blogId=freewheel3&logNo=220847292476&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F

'# 기타 공부한 것들 > math' 카테고리의 다른 글

이항분포  (0) 2019.01.28
베르누이 분포  (0) 2019.01.26
posterior과 bayesian  (6) 2018.10.20
Measure theory  (1) 2018.07.26
Set theory  (0) 2018.07.26

Abstract

Recent work has shown that convolutional networks can be substantially deeper, more accurate, and efficient to train if they contain shorter connections between layers close to the input and those close to the output. In this paper, we embrace this observation and introduce the Dense Convolutional Network (DenseNet), which connects each layer to every other layer in a feed-forward fashion. Whereas traditional convolutional networks with layers have connections—one between each layer and its subsequent layer—our network has L(L+1) direct connections. For2

each layer, the feature-maps of all preceding layers are used as inputs, and its own feature-maps are used as inputs into all subsequent layers. DenseNets have several compelling advantages: they alleviate the vanishing-gradient problem, strengthen feature propagation, encourage feature reuse, and substantially reduce the number of parameters. We evaluate our proposed architecture on four highly competitive object recognition benchmark tasks (CIFAR-10, CIFAR-100, SVHN, and ImageNet). DenseNets obtain significant improvements over the state-of-the-art on most of them, whilst requiring less computation to achieve high per- formance. Code and pre-trained models are available at https://github.com/liuzhuang13/DenseNet.


최근 CNN은 입력 근처의 레이어와 아웃풋 근처의 레이어가 짧은 connection을 가질 수록 더욱 깊고 정확한 결과를 만들어 내는 것을 볼 수 있다.

이 논문에서, 위와 같은것에 기반하여 정방향으로 모든 레이어가 연결된 Dense Convolutional Network(DenseNet)를 소개한다.

L개의 레이어를 가진 전통적인 합성곱 신경망은 L개의 연결을 가지지만(각 레이어와 그 다음 레이어 사이에 존재하는) 우리의 네트워크는 L(L+1) / 2개의 connection을 가진다. 

각 계층에서, 모든 이전 계층의 특징맵이 인풋으로서 사용되며, 다시 그것의 특징맵이 모든 후속레이어의 인풋으로서 사용되어진다.

DenseNet은 여러가지 장점이 있다. 

vanishing-gradient 문제를 완화하고, 특징 전파를 강력하게 하고, 특징 재사용과 실질적으로 파라미터의 수를 감소시킨다. 

4가지 유명한 곳에서 우리의 아키텍쳐를 평가하였다 (CIFAR-10, CIFAR-100, SVHN, and ImageNet)

DenseNet은 최신 결과보다 향상된 결과를 얻었지만, 높은 성능에 비해 컴퓨팅 능력은 덜 사용하였습니다.

코드와 pre-trained model은 깃허브에서 이용가능하다.


Reference

Huang, G., Liu, Z., Van Der Maaten, L., & Weinberger, K. Q. (2017, July). Densely connected convolutional networks. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 2261-2269). IEEE.

python 함수인

all(), any() 함수가 헷갈려서 테스트 코드를 사진으로 해서 올린다.


all() : 전부 True -> True

any() : 하나라도 True -> True


--------------------------------------------------------------------------------------

any                                                        all


'# 기타 공부한 것들 > 파이썬_etc.' 카테고리의 다른 글

gradient descent 구현  (0) 2019.02.16
파이썬 언어의 기본 etc  (0) 2019.02.01
windows docker 설치하기  (0) 2019.01.11
cv2를 이용한 이미지 관련  (0) 2018.12.08
Anaconda 가상환경 설치법  (0) 2018.10.26

Abstract

Training Deep Neural Networks is complicated by the fact that the distribution of each layer’s inputs changes during training, as the parameters of the previous layers change. This slows down the training by requiring lower learning rates and careful parameter initialization, and makes it no- toriously hard to train models with saturating nonlineari- ties. We refer to this phenomenon as internal covariate shift, and address the problem by normalizing layer in- puts. Our method draws its strength from making normal- ization a part of the model architecture and performing the normalization for each training mini-batch. Batch Nor- malization allows us to use much higher learning rates and be less careful about initialization. It also acts as a regu- larizer, in some cases eliminating the need for Dropout. Applied to a state-of-the-art image classification model, Batch Normalization achieves the same accuracy with 14 times fewer training steps, and beats the original model by a significant margin. Using an ensemble of batch- normalized networks, we improve upon the best published result on ImageNet classification: reaching 4.9% top-5 validation error (and 4.8% test error), exceeding the ac- curacy of human raters.


깊은 신경망을 훈련하는 것은 이전 계층 파라미터의 변화에 따라 훈련 도중 각 레이어의 인풋에 대한 분포의 변화 때문에 복잡하다. 

이는 학습에 낮은 학습률과 민감한 파라미터 초기화로 학습을 느리게 만들고, 포화 비선형성이 있는 모델을 학습시키는 것이 매우 어렵다.

우리는 이를 'internal covariate' 현상이라 칭하고, 각 층의 인풋을 정규화하는 문제라고 정의한다.

우리의 방법은 모델 아키텍처의 한 부분으로서 정규화를 포함시키고, mini-batch에 대한 정규화를 수행하는 것에 노력하였다.

Batch Normalization은 높은 학습률의 사용과 파라미터 초기화에 덜 민감하게 해준다.

regularizaer 역할을 하여, 케이스에 따라 Dropout의 필요성을 줄여준다.

state-of-the-art 이미지 분류 문제에서 적용했을 때, Batch Normalization은 14배나 작은 훈련 단계로 같은 정확률을 얻거나 높았습니다.

이를 사용한 네트워크 앙상블을 사용한다면, ImageNet 분류문제에서 최고의 성능을 낼 수 있습니다.


요약

  • weight의 변화가 가중되어 쌓일 때, hidden layer를 다수 거치면서 값이 변하게 되고 이는 우리가 원하는 결과가 다른 결과를 갖게 한다. 이를 Internal Covarient Shift라고 칭한다. 즉, k 번째 학습과 k+1 번째 학습에서의 분포의 변화가 심해진다는 것을 의미한다.
  • 이러한 문제를 해결하기 위해 적절한 가중치 초기화(어려움), 작은 학습률(학습속도가 너무느림)을 사용할 수 있지만, 문제가 많다.
  • 이를 위해 Batch Norm을 제안하였다. Activation 이전의 값의 변화를 줄이는 것이 목적.(Input -> layer -> BN -> Activation)
  • BN에서 mean 0, var 1을 주로 사용한다. var이 커지면 Internal Covarient Shift가 일어날 가능성이 높다.
  • 장점은 높은 학습률을 사용해도 안정적이라는 것, 가중치 초기화를 매우 잘하지 않아도 된다.
  • ELU(Exponential Linear Unit)은 BN이 필요없다고 주장한다. SELU 또한 그렇다.

 

Reference

Ioffe, S., & Szegedy, C. (2015). Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167.