2022.12.13 - [implement_ml_models/RNN] - implement_GRU(z)
implement_GRU(z)
GRU 는 LSTM 과 비슷한 원리로 작동, 간소화된 방식으로 계산이 간편하다는 장점, 이전 시점에서 받는 벡터가 h 로 하나이다. 또한 하나의 벡터 z 가 삭제, 입력 게이트를 모두 제어한다. 출력 게이
teach-meaning.tistory.com
def cal_r(self, t, input_x, output):
w_xr = np.random.rand(output.shape[0], input_x.shape[0])
w_hr = np.random.rand(output.shape[0], output.shape[1])
b_r = np.random.rand(output.shape[0],1)
self.w_xr.append(w_xr)
self.w_hr.append(w_hr)
self.b_r.append(b_r)
z = w_xr@input_x + w_hr@self.hidden_unit[t] + b_r
self.r.append(r)
return r
'implement_ml_models > RNN' 카테고리의 다른 글
implement_GRU(h) (0) | 2022.12.13 |
---|---|
implement_GRU(g) (0) | 2022.12.13 |
implement_GRU(z) (0) | 2022.12.13 |
implement_LSTM(hidden_unit_output) (0) | 2022.12.13 |
implement_LSTM(cell_state) (0) | 2022.12.13 |