Can you please guide how to transform the data into -255 and 255 form.
This is not as simple, only you can know how to deal with your data, I can only give you advises. If you need more, I would suggest discussing with your adviser and contacting the authors of this article (for the details only concerning the algorithm), they are actually very nice and helpful.
They mentioned in the paper that they have used modulation of 0 and pi only and that the elements of their matrix follow iid subgaussian distribution {-1 ,1}.
I went through the paper very quickly and this is not totally accurate, this was mentioned in the simulation part. However, in
the experiment, as shown if Fig. 4, they tried binary phase and binary amplitude inputs.
Stupid question, have you tried the algorithm with your data, regardless of the [-255,+255] consideration ?
Also the size of X_train is 12.40.40 rows and 40.40 columns. It means we have to send 12.40.40 random patterns on SLM area of 40.40, right?
I would guess so. Somewhere in the paper they specify the factor by which they oversimple, i.e. how much more inputs they used compare to the number of elements of the matrix. Here it would mean an factor of 12, which sounds about the correct order of magnitude. I remember a student who tried this algorithm finding a factor of about 7 did the trick.