reads/writes weights and predictions