Multi branching model depend on input data

HI,
I’m trying to implement imitation end-to-end self driving car model.

model-arch

as shown in image depend on command input I should pick a branch

That what I did…

in init

and in feedforward

I don’t know if this is messy or not…

but when i tried to feed data to the model i get error said

error

I don’t know how to do that… so how can I implement this branching part !

Thanks in advance