4e9802ed633e4d682fbf95e424c4f0bce0802c7f,tests/nn/initializers_test.py,TestInitializers,test_regex_matches_are_initialized_correctly,#TestInitializers#,22

Before Change


                                             default_initializer=lambda tensor: constant(tensor, 10))
        model = Net()
        initializers(model)
        layers = list(model.children())
        linear_layers = layers[:2]
        conv_layer = layers[2]

        for parameter in list(linear_layers[0].parameters()) + list(linear_layers[1].parameters()):
            assert torch.equal(parameter.data, torch.ones(parameter.size()) * 10)

After Change


            assert torch.equal(parameter.data, torch.ones(parameter.size()) * 5)

        parameter = model.linear_1_with_funky_name.bias
        assert torch.equal(parameter.data, torch.ones(parameter.size()) * 7)
        parameter = model.linear_1_with_funky_name.weight
        assert torch.equal(parameter.data, torch.ones(parameter.size()) * 10)

        for parameter in model.linear_2.parameters():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 5

Instances


Project Name: allenai/allennlp
Commit Name: 4e9802ed633e4d682fbf95e424c4f0bce0802c7f
Time: 2017-08-16
Author: mattg@allenai.org
File Name: tests/nn/initializers_test.py
Class Name: TestInitializers
Method Name: test_regex_matches_are_initialized_correctly


Project Name: chainer/chainerrl
Commit Name: 9a0e35a14e0ada29a71ef24e334187fa1d5af8ce
Time: 2019-04-17
Author: muupan@gmail.com
File Name: chainerrl/wrappers/vector_frame_stack.py
Class Name: VectorFrameStack
Method Name: __init__


Project Name: ilastik/ilastik
Commit Name: 504cfd6fc4806460178ba00c08b966aad67f23ba
Time: 2012-08-20
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/pixelClassification/opPixelClassification.py
Class Name: OpShapeReader
Method Name: execute


Project Name: philipperemy/keras-activations
Commit Name: f8f49cc6d18c2489690b133af45a521743f5fb5c
Time: 2019-01-03
Author: premy@cogent.co.jp
File Name: keract/keract.py
Class Name:
Method Name: display_activations


Project Name: reinforceio/tensorforce
Commit Name: 6273d5bcf7292ca77d7730bcd7102655f7c3bb82
Time: 2017-06-25
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/tests/test_preprocessing.py
Class Name: TestPreprocessing
Method Name: test_preprocessing_grayscale