I could fix that error. The sequence length in layout properties was 32 bits and my input was 20 bits. So input was taken as 32 bit by default. That caused a mismatch in number of elements when I used reshape function.
Is there any way to convert electrical signal to binary in Optisystem 7.0 ?