tensorflow-gpu2.0 遇到这种问题怎么办? InternalError: Failed to call ThenRnnForward with model…
- User
tensorflow-gpu2.0 遇到这种问题怎么办? InternalError: Failed to call ThenRnnForward with model config: [rnn_mode, rnn_input_mode, rnn_direction_mode]: 2, 0, 0 , [num_layers, input_size, num_units, dir_count, max_seq_length, batch_size, cell_num_units]: [1, 2, 256, 1, 6070, 4, 256] [Op:CudnnRNN]
2023-05-09 13:44:33.134543: E tensorflow/stream_executor/dnn.cc:588] CUDNN_STATUS_EXECUTION_FAILED in tensorflow/stream_executor/cuda/cuda_dnn.cc(1796): 'cudnnRNNForwardTraining( cudnn.handle(), rnn_desc.handle(), model_dims.max_seq_length, input_desc.handles(), input_data.opaque(), input_h_desc.handle(), input_h_data.opaque(), input_c_desc.handle(), input_c_data.opaque(), rnn_desc.params_handle(), params.opaque(), output_desc.handles(), output_data->opaque(), output_h_desc.handle(), output_h_data->opaque(), output_c_desc.handle(), output_c_data->opaque(), workspace.opaque(), workspace.size(), reserve_space.opaque(), reserve_space.size())' 2023-05-09 13:44:33.135101: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at cudnn_rnn_ops.cc:1498 : Internal: Failed to call ThenRnnForward with model config: [rnn_mode, rnn_input_mode, rnn_direction_mode]: 2, 0, 0 , [num_layers, input_size, num_units, dir_count, max_seq_length, batch_size, cell_num_units]: [1, 2, 256, 1, 6070, 4, 256]
- Assistant
该错误可能是由于您的GPU不支持当前的CUDNN版本导致的。您需要尝试更新或降级您的CUDNN版本,或者可能需要使用不同的TensorFlow版本。您可以尝试降低rnn_num_units的值或batch_size的值,看看是否会减轻问题。您还可以尝试在训练时使用更长的序列长度来减少内存使用。如果这些解决方法都不行,您可能需要更换更合适的GPU进行训练。