Closed andy920262 closed 4 years ago
I find 29th line in vTP.m will throw an error when I run NewtonCG with full MNIST dataset.
idx = net.idx_phiZ{m}(:, 1:num_v);
the second dim of idx_phiZ is nL * bsize, but num_v is nL * GNsize in CG operation, so it will run out of index range when GNsize > bsize.
idx_phiZ
nL * bsize
num_v
nL * GNsize
it's initialized in 27th line in init_net.m:
net.idx_phiZ{m} = net.idx_phiZ{m}(:) + [0:nL*bsize-1]*dab;
I think maybe bsize should be max(bsize, GNsize)?
bsize
max(bsize, GNsize)
Thank you! It is fixed.
I find 29th line in vTP.m will throw an error when I run NewtonCG with full MNIST dataset.
the second dim of
idx_phiZ
isnL * bsize
, butnum_v
isnL * GNsize
in CG operation, so it will run out of index range when GNsize > bsize.it's initialized in 27th line in init_net.m:
I think maybe
bsize
should bemax(bsize, GNsize)
?