c25fa38deb4efc5445f64af3ec17eae0eb660d2f,keras/models.py,Sequential,add,#Sequential#Any#,409

Before Change


                // to the input layer we just created.
                layer(x)

            if len(layer.inbound_nodes) != 1:
                raise ValueError("A layer added to a Sequential model must "
                                 "not already be connected somewhere else. "
                                 "Model received layer " + layer.name +
                                 " which has " +
                                 str(len(layer.inbound_nodes)) +
                                 " pre-existing inbound connections.")

            if len(layer.inbound_nodes[0].output_tensors) != 1:
                raise ValueError("All layers in a Sequential model "
                                 "should have a single output tensor. "
                                 "For multi-output layers, "

After Change


                    // In case of nested models: recover the first layer
                    // of the deepest model to infer input shape and dtype.
                    first_layer = layer.layers[0]
                    while isinstance(first_layer, (Model, Sequential)):
                        first_layer = first_layer.layers[0]
                    batch_shape = first_layer.batch_input_shape
                    dtype = first_layer.dtype
                else:
                    // We were passed a regular layer, and it should
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: c25fa38deb4efc5445f64af3ec17eae0eb660d2f
Time: 2017-11-09
Author: francois.chollet@gmail.com
File Name: keras/models.py
Class Name: Sequential
Method Name: add


Project Name: snipsco/snips-nlu
Commit Name: aae0ba842e293a63d6aaee45553712532054ef79
Time: 2017-04-12
Author: clement.doumouro@snips.ai
File Name: snips_nlu/slot_filler/data_augmentation.py
Class Name:
Method Name: get_noise_iterator


Project Name: epfl-lts2/pygsp
Commit Name: 7c7f681931aa62cb8c92657d2af75100507e03d0
Time: 2019-02-25
Author: michael.defferrard@epfl.ch
File Name: pygsp/graphs/stochasticblockmodel.py
Class Name: StochasticBlockModel
Method Name: __init__


Project Name: ntucllab/libact
Commit Name: b82f226368d589878d2d4634af5b8a457cd331b7
Time: 2016-03-11
Author: yangarbiter@gmail.com
File Name: libact/labelers/interactive_labeler.py
Class Name: InteractiveLabeler
Method Name: label