Cannot change grad_req in imported model


#1

I’m trying to load a pretrained model and fine tune it. Given that I’m using batch accumulation I need to change grad_req to ‘add’. However, when i do this it crashes with the following error:

src/imperative/./imperative_utils.h:733: Check failed: vctx[i].dev_type != -1 (-1 vs. -1) Cannot decide context for node NoGradient

This issue is also found here, however no solution was provided.