Trouble with logic and syntax of generator

Hey,

This problem is holding me back a bit so I am hopeful I can get some help here. I understand how to generate data in batches so I must be missing something with this particular approach. Here is what I have any insight would be great.

(Solution code removed by staff)

Hi, gennt.

I think your trouble lies in these lines:

target_pos = len_data_pos * [1]
target_neg = len_data_neg * [0]

Think about how many 1’s and 0’s should the target tensor have. As of now I think it is way too long for a batch

Hi @gennt,

I see you have already fixed it. Awesome.

Also, please know, posting solution code is against the honour code, which us why I have removed it.

You are allowed to post the errors. If any of the mentors would want to take a look at your code, which in some cases is required, they’d ask you to DM them it.

Happy learning,
Mubsi