Guest User

Untitled

a guest
Jun 22nd, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. encoder_inputs = Input(shape=(summaries.shape[1], ), name='Encoder-Input')
  2. inc_emb = Embedding(nb_words, embedding_dim, weights=[word_embedding_matrix],
  3. mask_zero=False, name='Body-Word-Embedding')(encoder_inputs)
  4.  
  5. x = BatchNormalization(name='Encoder-Batchnorm-1')(inc_emb)
  6.  
  7. _, state_h = GRU(embedding_dim, return_state=True, name='Encoder-Last-GRU')(x)
  8. encoder_model = Model(inputs=encoder_inputs, outputs=state_h,
  9. name='Encoder-Model')
  10. seq2seq_encoder_out = encoder_model(encoder_inputs)
  11.  
  12. decoder_inputs = Input(shape=(None,), name="Decoder-Input")
  13. dec_emb = Embedding(nb_words, embedding_dim, mask_zero=False,
  14. weights=[word_embedding_matrix],
  15. name="Decoder-Word-Embedding")(decoder_inputs)
  16.  
  17. dec_bn = BatchNormalization(name='Decoder-Batchnorm-1')(dec_emb)
  18. decoder_gru = GRU(embedding_dim, return_state=True, return_sequences=True,
  19. name="Decoder-GRU")
  20. decoder_gru_output, _ = decoder_gru(dec_bn, initial_state=seq2seq_encoder_out)
  21.  
  22. x = BatchNormalization(name='Decoder-Batchnorm-2')(decoder_gru_output)
  23. decoder_dense = Dense(nb_words, activation='softmax', name='Final-Output-Dense')
  24. decoder_outputs = decoder_dense(x)
  25.  
  26. ResourceExhaustedError: OOM when allocating tensor with shape[190000,59301] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
  27. [[Node: Final-Output-Dense/MatMul = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false, _device="/job:localhost/replica:0/task:0/device:GPU:0"](Final-Output-Dense/Reshape, Final-Output-Dense/Reshape_1)]]
  28. Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
  29.  
  30. [[Node: loss/mul/_271 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_4239_loss/mul", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]
  31. Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
Add Comment
Please, Sign In to add comment