-serialization code for ANNs