5d602fc6cf4bb99cb57ce434d5f75a4a15276065,autokeras/hypermodel/graph.py,,copy_block,#Any#,378

Before Change


    // these two functions in all blocks.
    block = copy.copy(old_block)
    block.clear_nodes()
    if isinstance(block, preprocessor.Preprocessor):
        block.clear_weights()
    return block


class GraphHyperModel(GraphHyperModelBase):

After Change



def copy_block(old_block):
    block = old_block.__class__()
    block.set_config(old_block.get_config())
    return block


class GraphHyperModel(GraphHyperModelBase):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: jhfjhfj1/autokeras
Commit Name: 5d602fc6cf4bb99cb57ce434d5f75a4a15276065
Time: 2019-10-04
Author: jhfjhfj1@gmail.com
File Name: autokeras/hypermodel/graph.py
Class Name:
Method Name: copy_block


Project Name: ray-project/ray
Commit Name: 7e63090ca989a4771c90d1b9afa201e30d4702a1
Time: 2021-03-20
Author: simon.mo@hey.com
File Name: python/ray/serve/backend_worker.py
Class Name: RayServeReplica
Method Name: _update_backend_configs