Thanks for your reply! Yes, exactly that’s how my getitem method works.
That means the sampler should have 860 (number of sequences) weight values instead of 860*9 which would be the case right now when I would use the flattening approach?
I am not quite sure how to realize that since this code snip
targets.append(np.array([weights[t] for t in labels]))

gets a weight for each sample in the sequence and a sequence can have targets from both classes (0 or 1). So how can I get a weight for the whole sequence?