python - Operations on huge dense matrices in numpy -
for purpose of training neural network, @ point have huge 212,243 × 2500 dense matrix phi, , vectors y (212243) , w (2500), stored numpy arrays of doubles. i'm trying compute is
w = dot(pinv(phi), y) # serialize w... r = dot(w, transpose(phi)) # serialize r... my machine has 6 gb of ram , 16 gb of swap on ubuntu x64. started computation twice , twice has ended system (not python) swap errors after hour of work.
is there way perform computation on computer? doesn't need done python.
if don't need pseudoinverse else computing w, replace line with:
w = np.linalg.lstsq(phi, y)[0] on system runs 2x faster, , uses half intermediate storage.
Comments
Post a Comment