I have a piece of code that is written in LUA and I want to know what is the pytorch equivalent of the code.?How do I implement these lines in pytorch … Can somebody help me with it? The code is mentioned in the comment
real_ctx[{{},{1},{},{}}][mask_global] = 2 * 117.0/255.0 - 1.0
real_ctx[{{},{2},{},{}}][mask_global] = 2 * 104.0/255.0 - 1.0
real_ctx[{{},{3},{},{}}][mask_global] = 2 * 123.0/255.0 - 1.0
input_ctx:copy(real_ctx)
This is in reference to “Context Encoders: Feature Learning by Inpainting” authored by Deepak Pathak