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

Before Change


                            "{type}.".format(type=x.dtype))

    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


                            "{type}.".format(type=x.dtype))

    def convert_to_dataset(self, x):
        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: 4

Non-data size: 9

Instances


Project Name: jhfjhfj1/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: jhfjhfj1/autokeras
Commit Name: e4a5dbe7e29d64c9b095d134f0ca2a5543353dda
Time: 2019-10-20
Author: jhfjhfj1@gmail.com
File Name: autokeras/hypermodel/base.py
Class Name: Head
Method Name: transform


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