dd3469ee312513f2b8a1b2e4e90e8eb95a6f3bbb,autokeras/adapters/input_adapter.py,TextInputAdapter,convert_to_dataset,#TextInputAdapter#Any#,63

Before Change


    def convert_to_dataset(self, x):
        if len(x.shape) == 1:
            x = x.reshape(-1, 1)
        if isinstance(x, np.ndarray):
            x = tf.data.Dataset.from_tensor_slices(x)
        return super().convert_to_dataset(x)


class StructuredDataInputAdapter(adapter_module.Adapter):

After Change


        x = super().convert_to_dataset(x)
        shape = data_utils.dataset_shape(x)
        if len(shape) == 1:
            x = x.map(lambda a: tf.reshape(a, [-1, 1]))
        return x


class StructuredDataInputAdapter(adapter_module.Adapter):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: keras-team/autokeras
Commit Name: dd3469ee312513f2b8a1b2e4e90e8eb95a6f3bbb
Time: 2020-06-09
Author: jhfjhfj1@gmail.com
File Name: autokeras/adapters/input_adapter.py
Class Name: TextInputAdapter
Method Name: convert_to_dataset


Project Name: pyannote/pyannote-audio
Commit Name: 3592ffe3e5fe916afda27c49e477299ebc08f908
Time: 2018-10-12
Author: bredin@limsi.fr
File Name: pyannote/audio/applications/change_detection.py
Class Name: SpeakerChangeDetection
Method Name: validate_epoch