375f42176d438788acac405e5982914ce04aa43f,memcnn/models/revop.py,InvertibleModuleWrapper,inverse,#InvertibleModuleWrapper#Any#,133

Before Change


                    input_tensor.storage().resize_(0)
            if self.training:
                self._valid_states.append(True)
                yin.register_hook(hook=partial(signal_hook, valid_states=self._valid_states, state_index=self._state_counter))
                x.register_hook(hook=partial(backward_hook, keep_input=self.keep_input_inverse,
                                             compute_input_fn=self._fn.forward, compute_output_fn=self._fn.inverse,
                                             valid_states=self._valid_states, state_index=self._state_counter,

After Change



        
        if not self.disable:
            x = ReversibleFunction.apply(yin, self._fn.inverse, self._fn.forward, self.keep_input_inverse, *[p for p in self._fn.parameters() if p.requires_grad])
            if not self.keep_input_inverse:
                if not pytorch_version_one_and_above:
                    // PyTorch 0.4 way to clear storage
                    yin.data.set_()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: silvandeleemput/memcnn
Commit Name: 375f42176d438788acac405e5982914ce04aa43f
Time: 2020-03-01
Author: silvandeleemput@gmail.com
File Name: memcnn/models/revop.py
Class Name: InvertibleModuleWrapper
Method Name: inverse


Project Name: silvandeleemput/memcnn
Commit Name: 375f42176d438788acac405e5982914ce04aa43f
Time: 2020-03-01
Author: silvandeleemput@gmail.com
File Name: memcnn/models/revop.py
Class Name: InvertibleModuleWrapper
Method Name: forward


Project Name: dpressel/mead-baseline
Commit Name: d8b7d488e4a96e6ec3915f9c36159518b6d2d930
Time: 2019-02-06
Author: dpressel@gmail.com
File Name: python/baseline/mime_type.py
Class Name:
Method Name: