If this conversion code is going to show up frequently, it would make sense to move it into the implicit defs in AdamContext.