I was trying to run your code with my dataset, and the number of training data is 18000, while my batch size is 500.
The following line can't work with the mentioned parameters because len(rand_index)<len(idx_train):
Here's the error that I get:
File "train.py", line 92, in get_batch rand_indx[0:len(idx_train)] = idx_train RuntimeError: The expanded size of the tensor (500) must match the existing size (18000) at non-singleton dimension 0. Target sizes: [500]. Tensor sizes: [18000]
I was trying to run your code with my dataset, and the number of training data is 18000, while my batch size is 500. The following line can't work with the mentioned parameters because
len(rand_index)<len(idx_train)
:File: train.py
rand_indx = torch.tensor(np.random.choice(np.arange(adj_label.shape[0]), batch_size)).type(torch.long).cuda() rand_indx[0:len(idx_train)] = idx_train
Here's the error that I get:
File "train.py", line 92, in get_batch rand_indx[0:len(idx_train)] = idx_train
RuntimeError: The expanded size of the tensor (500) must match the existing size (18000) at non-singleton dimension 0. Target sizes: [500]. Tensor sizes: [18000]
Could you please tell me how I can fix it?