Placeholders for LSTM-RNN parameters in TensorFlow -
i use placeholders dropout rate, number of hidden units, , number of layers in lstm-based rnn. below code trying.
dropout_rate = tf.placeholder(tf.float32) n_units = tf.placeholder(tf.uint8) n_layers = tf.placeholder(tf.uint8) net = rnn_cell.basiclstmcell(n_units) net = rnn_cell.dropoutwrapper(net, output_keep_prob = dropout_rate) net = rnn_cell.multirnncell([net] * n_layers) the last line gives following error:
typeerror: expected uint8, got <tensorflow.python.ops.rnn_cell.dropoutwrapper object ... of type 'dropoutwrapper' instead. i appreciate help.
the error raised following code: [net] * n_layers.
you trying make list looking [net, net, ..., net] (with length of n_layers), n_layers placeholder of unknown value.
i can't think of way placeholder, guess must go standard n_layers=3. (anyway, putting n_layers placeholder not practice in first place.)