a38a14f46715b7b0411d89c2e86854cf074c05a2,tslearn/shapelets.py,ShapeletModel,_set_model_layers,#ShapeletModel#Any#Any#Any#,310

Before Change


            layer.set_weights([weights_false_conv])

    def _set_model_layers(self, ts_sz, d, n_classes):
        inputs = Input(shape=(ts_sz, d), name="input")
        shapelet_sizes = sorted(self.n_shapelets_per_size.keys())
        pool_layers = []
        for i, sz in enumerate(sorted(shapelet_sizes)):
            transformer_layer = Conv1D(filters=sz,

After Change


                self.model.get_layer("false_conv_%d_%d" % (i, di)).set_weights([numpy.eye(sz).reshape((sz, 1, sz))])

    def _set_model_layers(self, ts_sz, d, n_classes):
        inputs = [Input(shape=(ts_sz, 1), name="input_%d" % di) for di in range(d)]
        shapelet_sizes = sorted(self.n_shapelets_per_size.keys())
        pool_layers = []
        for i, sz in enumerate(sorted(shapelet_sizes)):
            transformer_layers = [Conv1D(filters=sz,
                                         kernel_size=sz,
                                         trainable=False,
                                         use_bias=False,
                                         name="false_conv_%d_%d" % (i, di))(inputs[di]) for di in range(d)]
            shapelet_layers = [LocalSquaredDistanceLayer(self.n_shapelets_per_size[sz],
                                                         name="shapelets_%d_%d" % (i, di))(transformer_layers[di])
                               for di in range(d)]
            if d == 1:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: rtavenar/tslearn
Commit Name: a38a14f46715b7b0411d89c2e86854cf074c05a2
Time: 2017-09-22
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/shapelets.py
Class Name: ShapeletModel
Method Name: _set_model_layers


Project Name: stellargraph/stellargraph
Commit Name: 87601dbf79396f79bbc3af59b9627b4bd1adef44
Time: 2019-09-23
Author: 52440942+geoffj-d61@users.noreply.github.com
File Name: stellargraph/layer/graphsage.py
Class Name: GraphSAGE
Method Name: node_model


Project Name: idealo/image-super-resolution
Commit Name: 6a400eaccfa5e37e09dab9c4ad1ea282422bbbd4
Time: 2020-01-07
Author: testadicardi@gmail.com
File Name: ISR/models/cut_vgg19.py
Class Name: Cut_VGG19
Method Name: _cut_vgg