Could you check the shape of output before indexing it in this line of code?
change=output[0][change_ind]

I would assume that output should have the shape [batch_size, features], so output[0] would only use the first sample of the batch?