Are you using the DataParallel module or splitting things into a batch in any particular way? I originally passed all those arguments in as nested lists because it was the easiest way to get it all compatible with that, but I don’t see a reason why you shouldn’t be able to pass in a dictionary to a forward method (custom forward()'s don’t really care what you pass them). It looks like you’re actually passing a Variable in where you mean to be passing in that dictionary, seeing as the arch object is not a dict by the time it arrives at line 312.
Aside, wrapping all those things in a dict is something I’d been meaning to do but never got around to, good stuff.