bcf723a2f67a372e6b03a453149a82ecf2766fff,theanolm/network.py,Architecture,from_state,#Any#Any#,34

Before Change


                raise IncompatibleStateError(
                    "Parameter "arch.layers" is missing from neural network state.")
            // An ugly workaround to be able to save arbitrary data in a .npz file.
            try:
                dummy_dict = state["arch.layers"][()]
            except KeyError:
                dummy_dict = state["arch.layers"]
            layers = dummy_dict["data"]
            return classname(layers)

        @classmethod

After Change


            h5_layers = state["arch/layers"]

            for layer_id in sorted(h5_layers.keys()):
                layer = dict()
                h5_layer = h5_layers[layer_id]
                for variable in h5_layer.attrs:
                    layer[variable] = h5_layer.attrs[variable]
                for variable in h5_layer:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: senarvi/theanolm
Commit Name: bcf723a2f67a372e6b03a453149a82ecf2766fff
Time: 2015-12-24
Author: seppo.git@marjaniemi.com
File Name: theanolm/network.py
Class Name: Architecture
Method Name: from_state


Project Name: scipy/scipy
Commit Name: 73f93c38591b0099682d82e790aec13fcd13a6f5
Time: 2013-08-14
Author: argriffi@ncsu.edu
File Name: scipy/integrate/quadpack.py
Class Name: _NQuad
Method Name: _int


Project Name: googledatalab/pydatalab
Commit Name: 7a5f3c1751bc31f0bd5406bab04845461dd8c88a
Time: 2017-08-08
Author: qimingj@users.noreply.github.com
File Name: google/datalab/ml/_summary.py
Class Name: Summary
Method Name: get_events


Project Name: dmlc/gluon-cv
Commit Name: 4b8716fd4bd6f462a9db9eee958f2508576ec019
Time: 2018-06-15
Author: cheungchih@gmail.com
File Name: gluoncv/utils/metrics/coco_detection.py
Class Name: COCODetectionMetric
Method Name: __init__