b106ef05680def54ba3ea46d45f49d649ee21205,innvestigate/utils/tests/dryrun.py,PatternComputerTestCase,_apply_test,#PatternComputerTestCase#Any#Any#,75
Before Change
def _apply_test(self, method, network):
// Get explainer.
computer = method(network["out"])
// Dryrun.
x = np.random.rand(10, *(network["input_shape"][1:]))
patterns = computer.compute_patterns(x, 2)
self._assert(method, network, x, patterns)
After Change
def _apply_test(self, method, network):
// Create model.
model = keras.models.Model(inputs=network["in"], outputs=network["out"])
// Get analyzer.
analyzer = method(model)
// Dryrun.
x = np.random.rand(10, *(network["input_shape"][1:]))
patterns = computer.compute_patterns(x, 2)
self._assert(method, network, x, patterns)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: albermax/innvestigate
Commit Name: b106ef05680def54ba3ea46d45f49d649ee21205
Time: 2017-12-18
Author: alber.maximilian@gmail.com
File Name: innvestigate/utils/tests/dryrun.py
Class Name: PatternComputerTestCase
Method Name: _apply_test
Project Name: albermax/innvestigate
Commit Name: b106ef05680def54ba3ea46d45f49d649ee21205
Time: 2017-12-18
Author: alber.maximilian@gmail.com
File Name: innvestigate/utils/tests/dryrun.py
Class Name: AnalyzerTestCase
Method Name: _apply_test
Project Name: streamlit/streamlit
Commit Name: 1b6ab062a21bc0d6544e75a25e1726426bfd90d4
Time: 2019-02-14
Author: thiagot@gmail.com
File Name: lib/tests/streamlit/delta_generator_test.py
Class Name: DeltaGeneratorTextTest
Method Name: test_generic_text