Yep, good hint thanks!
I tried to implement a first example but struggling now with the batch-size. I tried making an array for the weight variable like this
        w = torch.tensor(np.matlib.repmat([0.3, 0.3, 0.3, 0.1, 0.1, 0.1], args.train_batch_size,1),dtype=torch.float32)

However the Weight-Vector can be only a 1D-Array, how would you face this problem?