375f42176d438788acac405e5982914ce04aa43f,memcnn/models/revop.py,InvertibleModuleWrapper,forward,#InvertibleModuleWrapper#Any#,91

Before Change


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

After Change



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

Frequency: 4

Non-data size: 6

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: forward


Project Name: tensorflow/models
Commit Name: 64710c051f26a2778c03fc15ef29c4bcae01df32
Time: 2018-08-22
Author: reedwm@google.com
File Name: official/recommendation/data_async_generation.py
Class Name:
Method Name: _construct_training_records


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: deepchem/deepchem
Commit Name: 763f8721952e8042d6086b103deb2450334be4b3
Time: 2017-03-09
Author: lilleswing@gmail.com
File Name: scripts/dock_dude.py
Class Name:
Method Name: prepare_ligands