Closed zstbackcourt closed 5 years ago
I haven't experience such issue on the ridge regression head, but the following should help.
After line 102 which says
block_kernel_matrix = kernel_matrix.repeat(n_way, 1, 1) #(n_way * tasks_per_batch, n_support, n_support)
append
block_kernel_matrix += 1.0 * torch.eye(n_support).expand(n_way * tasks_per_batch, n_support, n_support).cuda()
Let me know if this helps.
Hello, this problem can't be solved.
I think upgrading PyTorch to version 1.0 can solve the problem as mentioned in https://github.com/locuslab/qpth/issues/28
block_kernel_matrix += 1.0 torch.eye(n_support).expand(n_way tasks_per_batch, n_support, n_support).cuda()
I cannot find such line in the code, would you help me please? In what .py is it?
I'm having the same error
Even with the pytorch version 1.0, it gives the same error. Have you resolved it?
when I run the code using " python train.py --gpu 0 --save-path "./experiments/CIFAR_FS_MetaOptNet_RR" --train-shot 5 --head Ridge --network ResNet --dataset CIFAR_FS ",I met the error
RuntimeError: qpth Error: Cannot perform LU factorization on Q. Please make sure that your Q matrix is PSD and has a non-zero diagonal.
How can I solve this error?