python报错

ValueError: Your version of xlrd is 2.0.1. In xlrd >= 2.0, only the xls format is supported. Install openpyxl instead.
解决:pip install openpyxl
2.
ValueError: Variable sec_lstm/rnn/multi_rnn_cell/cell_0/basic_lstm_cell/kernel already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope?
解决:tf.compat.v1.reset_default_graph()

tf.nn.rnn_cell.LSTMStateTuple设置初始状态与cell.zero_state().

state_is_tuple用于LSTM单元,因为LSTM单元的状态是元组. cell.zero_state是所有RNN单元的状态的初始化程序.您通常会更喜欢cell.zero_state函数,因为它将根据state_is_tuple是否为true来初始化所需的状态类。cell.zero_state()与单元格的类型(LSTM,GRU,RNN)无关

你可能感兴趣的:(笔记,python)