aswin-raghavan

Results 4 issues of aswin-raghavan

https://github.com/JeremieMelo/pytorch-onn/blob/a0f1593fb013d189da9aa320aa28a7c08bd7b656/torchonn/layers/mzi_linear.py#L424 ` self.build_weight_from_phase(self.delta_list_U, phase_U, self.delta_list_V, phase_V, phase_S, self.S_scale)` Scale is passed in error, the function expects update_list. In other places, no scale is passed and the `self.S_scale` is used. Continuing...

https://github.com/JeremieMelo/pytorch-onn/blob/a0f1593fb013d189da9aa320aa28a7c08bd7b656/torchonn/layers/mrr_linear.py#L278 `TypeError: AddDropMRRLinear.build_weight_from_phase() takes 2 positional arguments but 3 were given` `weight = self.build_weight_from_phase(phase) #, self.S_scale)`

https://github.com/JeremieMelo/pytorch-onn/blob/a0f1593fb013d189da9aa320aa28a7c08bd7b656/torchonn/layers/mrr_linear.py#L135 The function `mrr_tr_to_roundtrip_phase` returns a tuple `cos_phi.acos(), cos_phi` (Line 73 in mrr_op.py). Fix: ``` phi, _ = self.mrr_tr_to_roundtrip_phase( self.mrr_weight_to_tr(self.weight.data.div(scale)), self.MRRConfig.attenuation_factor, self.MRRConfig.coupling_factor, ) self.phase.data.copy_(phi % (2 * np.pi) ) ```...

https://github.com/JeremieMelo/pytorch-onn/blob/a0f1593fb013d189da9aa320aa28a7c08bd7b656/torchonn/layers/mrr_linear.py#L208 When `self.mrr_tr_to_roundtrip_phase` is called, which is `self.mrr_tr_to_roundtrip_phase = mrr_tr_to_roundtrip_phase`, which is in `mrr.py`: `def mrr_tr_to_roundtrip_phase(t, a, r):`, this will cause the error: `TypeError: mrr_tr_to_roundtrip_phase() missing 2 required positional arguments:...