-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
met "Segmentation fault": added a lstm layer in the full_network, when run train #4
Comments
Hi, Could you provide more details about which function of which file you are changing? |
Hi,
|
I would define an LSTM function as follows: def bi_static_stacked_RNN(x, scope='RNN', lstm_size = config.lstm_size):
And then pass the output to it as: |
Hi, thanks the share. when i add a lstm layer, met "Segmentation fault"
Add a simple lstm layer in the full_network, the code is below:
output = tf.squeeze(output) // origin code, doesn't change.
// lstm, the code i add.
lstm_cell = tf.contrib.rnn.BasicLSTMCell(64, forget_bias=1.0, state_is_tuple=True)
init_state = lstm_cell.zero_state(batch_size=config.batch_size, dtype=tf.float32)
lstm_out, final_state = tf.nn.dynamic_rnn(lstm_cell, output, initial_state=init_state, time_major=False)
print("-----------lstm_out.shape------------", lstm_out.shape) // (30, 128, 64)
return lstm_out
when train, i meet "Segmentation fault", and there is no other error information.
it's amazing, the code i add is simple and no fault.
The text was updated successfully, but these errors were encountered: