2faf7acd48088783ab4d8507cc3eb1e74430b3ad,sonnet/src/reshape.py,Reshape,_initialize,#Reshape#Any#,166
Before Change
@once.once
def _initialize(self, inputs):
input_shape = _extract_input_shape(inputs, self._preserve_dims)
self.input_shape = input_shape.as_list()
def __call__(self, inputs):
Reshapes ``inputs``.
After Change
@once.once
def _initialize(self, inputs):
if inputs.shape.rank < self._preserve_dims:
raise ValueError("Input tensor has {} dimensions, should have at least "
"as many as preserve_dims={}".format(
inputs.shape.rank, self._preserve_dims))
self._input_shape = inputs.shape
def __call__(self, inputs):
Reshapes ``inputs``.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: deepmind/sonnet
Commit Name: 2faf7acd48088783ab4d8507cc3eb1e74430b3ad
Time: 2019-08-14
Author: slebedev@google.com
File Name: sonnet/src/reshape.py
Class Name: Reshape
Method Name: _initialize
Project Name: asyml/texar
Commit Name: 42efaa53edce9b84a98fef1fce24502e6d2ba941
Time: 2017-12-08
Author: shore@pku.edu.cn
File Name: texar/modules/encoders/transformer_encoders.py
Class Name: TransformerEncoder
Method Name: __init__
Project Name: asyml/texar
Commit Name: 791e7325a985bc8dd1a213c7cd1b1e888f934074
Time: 2018-05-27
Author: zhitinghu@gmail.com
File Name: texar/modules/embedders/embedders.py
Class Name: WordEmbedder
Method Name: __init__