mhamdan:

Per the second option, is this how you considered doing it?


What I had in mind was more to add before the end something like:

# Optimize at the clip_level 
summed_output = 0.
summed_output += net(frame1).sum()
summed_output += net(frame2).sum()
summed_output += net(frame3).sum()
optimizer.zero_grad() 
loss = criterion(summed_output , clip_label)
loss.backward()
optimizer.step()