added read-from-string back
moved test function outside
fixed output counts for memory layer
rounded gate outputs to 0,1
added functions to cuda definitions
upgraded calculate-memory to validate-memory
updated validation launches
made some initialized values static