Closed Hima-Mehta closed 8 years ago
I don't think we ever implemented general-purpose weight export code, but you can examine the .cfs attribute of your CFProjection to see the array of ConnectionFields, and then look at the .weights attribute of each CF, exporting it from there however you see fit.
Unless you mean saving them into a file for the purposes of restoring them later (rather than analyzing them), in which case you can use save_snapshot.
Well I tried to save lateral weights of Lissom using
topo.sim["<sheet>"].projections()["LateralExcitatory"].cfs[1,1]
But the problem here is it gives me the cropped weights . I need the whole matrix where extras padded with zero ! I can see them in GUI using connections->Lateralexcitatotry->printing particular weights to terminal.
I can not fill in the zeros because I don't know the exact amount of padding in all sides.
IIRC this should give you what you want:
topo.sim["<sheet>"].projections()["LateralExcitatory"].view(x, y, situated=True).data
where x, y is the position of the CF in sheet coordinates.
Thanks for your reply .It seems view option isn't available with Resizable CF,
Checked options with dir(topo.sim["<sheet>"].projections()["LateralExcitatory"])
I have two sheets later being CFSheet with CFprojection . Now what should I do if I want to save the weights into an array or file after few run or at the end ?