-1
decoder_targets_one_hot = np.zeros((
        len(input_sentences),
        max_out_len,
        num_words_output
    ),
    dtype='float32'
)

I am getting a memory error in the line dtype='float32'. I am stuck in this. How to get through this?

  • 1
    Please post the full traceback so we can see the exact error. What is the length of the list? – tdelaney Jul 23 '20 at 06:01
  • Welcome to Stack Overflow. You might want to read [how to ask a question](https://stackoverflow.com/help/how-to-ask). In this case it would help if you post a [mre] and the complete stacktrace. – wovano Jul 23 '20 at 06:05
  • When you ask a quesiton, please follow up with the questions we ask you. Knowing the size of the array you are trying to create is a critical part of the question. You've got multiple people who will engage on this but now it seems like you are just wasting our time. – tdelaney Jul 23 '20 at 06:11

1 Answers1

0

The ndarray you are trying to initiate is too large when using float32 as the datatype. Either reduce the dimension size or get more ram.

ZWang
  • 832
  • 5
  • 14