debug nan

_weights nan2zero + shared mem changes