본문 바로가기

전체 글55

RNN, LSTM ? RNN (Recurrent Neural Network) 이름에서 알 수 있듯이 순환적 구조를 가지고 있다. 따라서 이전의 정보를 완전히 잃지 않고 이어나갈 수 있다. 연속적인 데이터나 시계열 데이터에 주로 사용된다. $ h_{t} = tanh(W_{h}h_{t-1} + W_{x}x_{t} + b) $ $ y_{t} = W_{y}h_{t} $ tanh 함수의 문제로 gradient vanishing 문제 발생할 수 있음 ( 멀리 떨어진 정보 소실될 수 있음 ) LSTM (Long Short Term Memory Network) RNN의 한 종류. LSTM의 핵심 아이디어는 "cell state"이다. 위 그림에서 가장 윗쪽의 수평선에 해당한다. cell state와 연산을 하기 위한 삭제 게이트, 입력 게.. 2021. 8. 16.
BaseActivity, BaseFragment abstract class는 인스턴스화 될 수 없으며 반드시 상속되어야 함. 반드시 구현해야 할 function을 정의할 수 있음 abstract class DefaultActivity(@LayoutRes val resId: Int): AppCompatActivity() { val binding: T by lazy { DataBindingUtil.setContentView(this, resId) } val viewModel by viewModel() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(binding.root) } }abstract class DefaultFr.. 2021. 8. 13.
[Tensorflow 2.x] 기초 tensor ~= Numpy.arrays 일반적인 축 순서: tf.zeros([batch, width, height, features]) variable tensor = tf.constant([[1.0, 2.0], [3.0, 4.0]]) variable = tf.Variable(tensor, name='my_tensor') variable.assign([[1,2], [3,4]]) # same as initial variable (keep dtype) variable.assign_add([[1,1], [1,1]]) # [[2.,3.], [4.,5.,]] print(tf.Variable(tensor+1) == tf.Variable(tensor)) # [[False, False], [False, False]].. 2021. 8. 13.
[CNN] DenseNet Implementation (Keras) DenseNet DenseNet의 전체적인 구조 Dense Connectivity $$ x_{l}=f([x_{0},x_{1},...,x_{l−1}]) $$ ResNet의 Add와 다르게 Concatenate를 사용 Implementation Architecture 위 구조에 따라 구현 (growth rate=32) Util Functions def get_full_props(properties): assert properties.get('filters') is not None assert properties.get('kernel_size') is not None assert properties.get('padding') in ['valid','same', None] filters = properties... 2021. 8. 10.