refactored a bit to put more stuff in cwc_convnet_context_t