python: distinct input/output vocabs; optionally skip one hidden layer