본문 바로가기
IT/machine learning

tensorflow keras running error about initializers

by Jang HyunWoong 2019. 1. 22.

(Tensorflow version is 1.8)


Error Message contains : "lstm/lstm_cell/recurrent_kernel/Initializer/random_normal"


It means that it needs initailizers

Initializations define the way to set the initial random weights of Keras layers


The keyword arguments used for passing initializers to layers will depend on the layer. Usually it is simply kernel_initializer and bias_initializer:

model.add(Dense(64,
                kernel_initializer='random_uniform',
                bias_initializer='zeros'))

- from: https://keras.io/initializers




In tensorflow


model.add(Dense(32, activation='relu', kernel_initializer='random_uniform')) <- it works


Add kernel initializer to solve the error


(but when there is no bias_initializer, it works well, I think it is defined as default.)


반응형