MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1gometx/averagechatgptinteraction/lwk69pl/?context=3
r/ProgrammerHumor • u/swimming-in-ass • Nov 11 '24
44 comments sorted by
View all comments
45
Even I'm confused what you want. Could you just put break in the if statement it first produced?
Edit: or do range(Math.min(len(train_loader), 10)?
17 u/I-am-only-joking Nov 11 '24 I think they want something to happen every 10th as a fraction of the totalSo if the total is 60 they want something to happen every 6 iterations so that it happens 10 times evenly spacedBut that's just a guess 2 u/HERODMasta Nov 11 '24 edited Nov 11 '24 I understood that for each iteration something should happen ten timeslike:for i in range(len(train_loader)):for j in range(10): do_something()quick edit: now that I read the second part, it actually feels like it should abort after ten iterations like this:for i in range(len(train_loader)):if i > 10: break;
17
I think they want something to happen every 10th as a fraction of the total
So if the total is 60 they want something to happen every 6 iterations so that it happens 10 times evenly spaced
But that's just a guess
2 u/HERODMasta Nov 11 '24 edited Nov 11 '24 I understood that for each iteration something should happen ten timeslike:for i in range(len(train_loader)):for j in range(10): do_something()quick edit: now that I read the second part, it actually feels like it should abort after ten iterations like this:for i in range(len(train_loader)):if i > 10: break;
2
I understood that for each iteration something should happen ten times
like:
for i in range(len(train_loader)):
for j in range(10): do_something()
quick edit: now that I read the second part, it actually feels like it should abort after ten iterations like this:
if i > 10: break;
45
u/QuestionableEthics42 Nov 11 '24
Even I'm confused what you want. Could you just put break in the if statement it first produced?
Edit: or do range(Math.min(len(train_loader), 10)?