albermax / innvestigate

A toolbox to iNNvestigate neural networks' predictions!
Other
1.25k stars 233 forks source link

PatternNet fails with Keras 2.1.6 #68

Closed postskript closed 6 years ago

postskript commented 6 years ago

I have the newest Keras 2.1.6 and all_methods.py crashes for PatternNet (TypeError: softmax() got an unexpected keyword argument 'axis' etc.). However, it works with Keras 2.1.5.

Tensorflow was on version 1.4.0.

We should probably explicitly ask for these specific versions, at least for the prerelease.

albermax commented 6 years ago

Did not crash for me. For now the Keras requirement is 2.1.6.

Could you please try again?

sebastian-lapuschkin commented 6 years ago

Same error. I have also been switching from keras 2.1.5 to 2.1.6, while running tf 1.4 (and cuda8)

seems like tf1.4 does not play along well with keras 2.1.6m but updating tf beyond 1.4 requires an installation of cuda 9

will do so and report back

cheers

python3 mnist_all_methods.py /home/lapuschkin/.local/lib/python3.5/site-packages/h5py-2.7.1-py3.5-linux-x86_64.egg/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Using TensorFlow backend. 60000 train samples 10000 test samples 2018-06-15 16:02:59.945546: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA 2018-06-15 16:03:00.148977: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: name: TITAN Xp major: 6 minor: 1 memoryClockRate(GHz): 1.582 pciBusID: 0000:04:00.0 totalMemory: 11.90GiB freeMemory: 11.74GiB 2018-06-15 16:03:00.247602: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 1 with properties: name: Quadro M2000 major: 5 minor: 2 memoryClockRate(GHz): 1.1625 pciBusID: 0000:03:00.0 totalMemory: 3.93GiB freeMemory: 2.20GiB 2018-06-15 16:03:00.247643: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Device peer to peer matrix 2018-06-15 16:03:00.247659: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1051] DMA: 0 1 2018-06-15 16:03:00.247666: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1061] 0: Y N 2018-06-15 16:03:00.247673: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1061] 1: N Y 2018-06-15 16:03:00.247681: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1) 2018-06-15 16:03:00.247690: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1107] Ignoring gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT. /home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/models.py:282: UserWarning: No training configuration found in save file: the model was not compiled. Compile it manually. warnings.warn('No training configuration found in save file: ' Traceback (most recent call last): File "mnist_all_methods.py", line 90, in model, modelp = mutils.create_model(channels_first, modelname, kwargs) File "utils_mnist.py", line 75, in create_model model_wo_sm, model_w_sm = model_init_fxn(input_shape[1:]) File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/applications/mnist.py", line 99, in pretrained_plos_long_relu return _load_pretrained_net("pretrained_plos_long_relu", input_shape) File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/applications/mnist.py", line 94, in _load_pretrained_net model_w_sm.add(keras.layers.Activation("softmax")) File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/models.py", line 522, in add output_tensor = layer(self.outputs[0]) File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/topology.py", line 619, in call output = self.call(inputs, kwargs) File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/layers/core.py", line 304, in call return self.activation(inputs) File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/activations.py", line 29, in softmax return K.softmax(x) File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2963, in softmax return tf.nn.softmax(x, axis=axis) TypeError: softmax() got an unexpected keyword argument 'axis'

-- Sebastian Lapuschkin

Machine Learning Group Department of Video Coding & Analytics Fraunhofer HHI - Heinrich Hertz Institute Einsteinufer 37 10587 Berlin

Phone : +49 30 31002-371<tel:%2B49%2030%2031002-371> Fax : +49 30 31002-558<tel:%2B49%2030%2031002-558> Mail : sebastian.lapuschkin@hhi.fraunhofer.demailto:sebastian.bach@hhi.fraunhofer.de


Von: Maximilian Alber [notifications@github.com] Gesendet: Freitag, 15. Juni 2018 14:59 An: albermax/innvestigate Cc: Subscribed Betreff: Re: [albermax/innvestigate] PatternNet fails with Keras 2.1.6 (#68)

Did not crash for me. For now the Keras requirement is 2.1.6.

Could you please try again?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/albermax/innvestigate/issues/68#issuecomment-397612465, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ARJscHixUb__1rjUKh3haGRDd5IapfKyks5t86-hgaJpZM4Thxt9.

sebastian-lapuschkin commented 6 years ago

Previously, I have run keras 2.1.5 tensorflow 1.4 CUDA 8.0 + cudnn 6.0 without issues.


Now, I have updated my libraries to keras 2.1.6 tensorflow(-gpu) 1.8 including the respective dependencies CUDA 9.0 (via deb)+ cudnn7.0.5 (manual installation) as recommended in https://www.tensorflow.org/install/install_linux

I am running the currently most recent commit 8e1bc38 in the develop branch


CPU: Everything runs fine.

GPU: examples/mnist_all_methods.py runs fine (which trains a pattern for PatternNet

examples/all_methods.py FAILS for PatternNet and PatternAttribution:

PatternNet stack trace:

python3 all_methods.py 
/home/lapuschkin/.local/lib/python3.5/site-packages/h5py-2.7.1-py3.5-linux-x86_64.egg/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.
2018-06-15 18:18:46.571300: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-06-15 18:18:46.794283: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 0 with properties: 
name: TITAN Xp major: 6 minor: 1 memoryClockRate(GHz): 1.582
pciBusID: 0000:04:00.0
totalMemory: 11.91GiB freeMemory: 11.74GiB
2018-06-15 18:18:46.919666: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 1 with properties: 
name: Quadro M2000 major: 5 minor: 2 memoryClockRate(GHz): 1.1625
pciBusID: 0000:03:00.0
totalMemory: 3.93GiB freeMemory: 3.01GiB
2018-06-15 18:18:46.919730: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:18:46.919748: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:18:47.207494: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:18:47.207523: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:18:47.207531: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:18:47.207535: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:18:47.207808: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
Image 0: Input (0.0128s) Gradient (0.3931s) SmoothGrad (2.4949s) Integrated Gradients (0.8843s) Deconvnet (0.7386s) Guided Backprop (0.3482s) PatternNet 2018-06-15 18:19:00.867833: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at reshape_op.h:51 : Invalid argument: Size 1 must be non-negative, not -7
Traceback (most recent call last):
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]
     [[Node: project_24/clip_by_value/_837 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_839_project_24/clip_by_value", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "all_methods.py", line 139, in <module>
    a = analyzer.analyze(image if is_input_analyzer else x)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/analyzer/base.py", line 392, in analyze
    ret = self._analyzer_model.predict_on_batch(X)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/training.py", line 1945, in predict_on_batch
    outputs = self.predict_function(ins)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2482, in __call__
    **self.session_kwargs)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]
     [[Node: project_24/clip_by_value/_837 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_839_project_24/clip_by_value", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

PatternAttribution stack trace:

python3 all_methods.py 
/home/lapuschkin/.local/lib/python3.5/site-packages/h5py-2.7.1-py3.5-linux-x86_64.egg/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.
2018-06-15 18:19:39.539107: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-06-15 18:19:39.742150: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 0 with properties: 
name: TITAN Xp major: 6 minor: 1 memoryClockRate(GHz): 1.582
pciBusID: 0000:04:00.0
totalMemory: 11.91GiB freeMemory: 11.74GiB
2018-06-15 18:19:39.843456: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 1 with properties: 
name: Quadro M2000 major: 5 minor: 2 memoryClockRate(GHz): 1.1625
pciBusID: 0000:03:00.0
totalMemory: 3.93GiB freeMemory: 3.03GiB
2018-06-15 18:19:39.843496: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:19:39.843504: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:19:40.080899: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:19:40.080930: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:19:40.080936: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:19:40.080940: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:19:40.081210: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
Image 0: Input (0.0266s) Gradient (0.4613s) SmoothGrad (2.5864s) Integrated Gradients (0.9241s) Deconvnet (0.7463s) Guided Backprop (0.3300s) PatternAttribution 2018-06-15 18:19:54.671866: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at reshape_op.h:51 : Invalid argument: Size 1 must be non-negative, not -7
Traceback (most recent call last):
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]
     [[Node: project_24/clip_by_value/_837 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_839_project_24/clip_by_value", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "all_methods.py", line 139, in <module>
    a = analyzer.analyze(image if is_input_analyzer else x)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/analyzer/base.py", line 392, in analyze
    ret = self._analyzer_model.predict_on_batch(X)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/training.py", line 1945, in predict_on_batch
    outputs = self.predict_function(ins)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2482, in __call__
    **self.session_kwargs)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]
     [[Node: project_24/clip_by_value/_837 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_839_project_24/clip_by_value", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

ALL OTHER METHODS ARE FINE Might retraining and re-uploading the patterns for both methods a solution?

sebastian-lapuschkin commented 6 years ago

FYI: The output of python3 setup.py test

running pytest
running egg_info
writing requirements to innvestigate.egg-info/requires.txt
writing top-level names to innvestigate.egg-info/top_level.txt
writing dependency_links to innvestigate.egg-info/dependency_links.txt
writing innvestigate.egg-info/PKG-INFO
reading manifest file 'innvestigate.egg-info/SOURCES.txt'
writing manifest file 'innvestigate.egg-info/SOURCES.txt'
running build_ext
========================================= test session starts =========================================
platform linux -- Python 3.5.2, pytest-3.5.0, py-1.5.3, pluggy-0.6.0
rootdir: /home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate, inifile: setup.cfg
collected 91 items / 8 deselected                                                                     

innvestigate/tests/analyzer/test_base.py ..............                                         [ 16%]
innvestigate/tests/analyzer/test_gradient_based.py ............                                 [ 31%]
innvestigate/tests/analyzer/test_misc.py ..                                                     [ 33%]
innvestigate/tests/analyzer/test_pattern_based.py .F.F.                                         [ 39%]
innvestigate/tests/analyzer/test_relevance_based.py .................                           [ 60%]
innvestigate/tests/analyzer/test_wrapper.py ...s...s...s...                                     [ 78%]
innvestigate/tests/tools/test_pattern.py .s.........                                            [ 91%]
innvestigate/tests/utils/keras/test_graph.py ....                                               [ 96%]
innvestigate/tests/utils/tests/test_dryrun.py .                                                 [ 97%]
innvestigate/tests/utils/tests/test_layer.py ..                                                 [100%]

============================================== FAILURES ===============================================
_____________________________________ test_precommit__PatternNet ______________________________________

    @pytest.mark.precommit
    def test_precommit__PatternNet():

        def method(model):
            # enough for test purposes, only pattern application is tested here
            # pattern computation is tested separately.
            # assume that one dim weights are biases, drop them.
            patterns = [x for x in model.get_weights()
                        if len(x.shape) > 1]
            return PatternNet(model, patterns=patterns)

>       dryrun.test_analyzer(method, "mnist.*")

innvestigate/tests/analyzer/test_pattern_based.py:60: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

method = <function test_precommit__PatternNet.<locals>.method at 0x7fc6a09ecd08>
network_filter = 'mnist.*'

    def test_analyzer(method, network_filter):
        # todo: Mixing of pytest and unittest is not ideal.
        # Move completely to pytest.
        test_case = AnalyzerTestCase(method=method,
                                     network_filter=network_filter)
        test_result = unittest.TextTestRunner().run(test_case)
>       assert len(test_result.errors) == 0
E       AssertionError

innvestigate/utils/tests/dryrun.py:123: AssertionError
---------------------------------------- Captured stderr call -----------------------------------------
2018-06-15 18:38:40.779866: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:40.779907: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:40.779935: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:40.779943: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:40.779949: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:40.779953: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:40.780082: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:41.616838: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at reshape_op.h:51 : Invalid argument: Size 1 must be non-negative, not -7
2018-06-15 18:38:41.730466: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:41.730491: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:41.730514: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:41.730521: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:41.730527: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:41.730532: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:41.730648: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:42.597257: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at reshape_op.h:51 : Invalid argument: Size 1 must be non-negative, not -7
2018-06-15 18:38:42.717351: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:42.717372: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:42.717392: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:42.717398: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:42.717403: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:42.717407: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:42.717509: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:44.009321: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at reshape_op.h:51 : Invalid argument: Size 1 must be non-negative, not -8
2018-06-15 18:38:44.180842: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:44.180873: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:44.180897: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:44.180904: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:44.180910: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:44.180914: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:44.181030: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:45.894020: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at reshape_op.h:51 : Invalid argument: Size 1 must be non-negative, not -8
2018-06-15 18:38:45.918149: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:45.918171: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:45.918192: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:45.918200: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:45.918205: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:45.918210: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:45.918328: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:46.242038: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:46.242067: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:46.242087: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:46.242094: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:46.242100: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:46.242105: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:46.242223: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:46.803016: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:46.803045: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:46.803083: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:46.803101: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:46.803108: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:46.803112: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:46.803240: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)

======================================================================
ERROR: runTest (innvestigate.utils.tests.dryrun.AnalyzerTestCase) (network_name='mnist.cnn_1convb_2dense')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]
     [[Node: project_9/clip_by_value/_187 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_340_project_9/clip_by_value", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 83, in runTest
    self._apply_test(network)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 110, in _apply_test
    analysis = analyzer.analyze(x)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/analyzer/base.py", line 392, in analyze
    ret = self._analyzer_model.predict_on_batch(X)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/training.py", line 1945, in predict_on_batch
    outputs = self.predict_function(ins)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2482, in __call__
    **self.session_kwargs)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]
     [[Node: project_9/clip_by_value/_187 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_340_project_9/clip_by_value", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

======================================================================
ERROR: runTest (innvestigate.utils.tests.dryrun.AnalyzerTestCase) (network_name='mnist.cnn_2convb_2dense')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 83, in runTest
    self._apply_test(network)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 110, in _apply_test
    analysis = analyzer.analyze(x)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/analyzer/base.py", line 392, in analyze
    ret = self._analyzer_model.predict_on_batch(X)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/training.py", line 1945, in predict_on_batch
    outputs = self.predict_function(ins)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2482, in __call__
    **self.session_kwargs)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]

======================================================================
ERROR: runTest (innvestigate.utils.tests.dryrun.AnalyzerTestCase) (network_name='mnist.cnn_2convb_3dense')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -8
     [[Node: project_9/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_9/add, project_9/truediv-1-ReshapeConst-LayoutOptimizer)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 83, in runTest
    self._apply_test(network)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 110, in _apply_test
    analysis = analyzer.analyze(x)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/analyzer/base.py", line 392, in analyze
    ret = self._analyzer_model.predict_on_batch(X)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/training.py", line 1945, in predict_on_batch
    outputs = self.predict_function(ins)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2482, in __call__
    **self.session_kwargs)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -8
     [[Node: project_9/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_9/add, project_9/truediv-1-ReshapeConst-LayoutOptimizer)]]

======================================================================
ERROR: runTest (innvestigate.utils.tests.dryrun.AnalyzerTestCase) (network_name='mnist.cnn_3convb_3dense')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -8
     [[Node: project_9/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_9/add, project_9/truediv-1-ReshapeConst-LayoutOptimizer)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 83, in runTest
    self._apply_test(network)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 110, in _apply_test
    analysis = analyzer.analyze(x)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/analyzer/base.py", line 392, in analyze
    ret = self._analyzer_model.predict_on_batch(X)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/training.py", line 1945, in predict_on_batch
    outputs = self.predict_function(ins)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2482, in __call__
    **self.session_kwargs)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -8
     [[Node: project_9/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_9/add, project_9/truediv-1-ReshapeConst-LayoutOptimizer)]]

----------------------------------------------------------------------
Ran 1 test in 6.759s

FAILED (errors=4)
_________________________________ test_precommit__PatternAttribution __________________________________

    @pytest.mark.precommit
    def test_precommit__PatternAttribution():

        def method(model):
            # enough for test purposes, only pattern application is tested here
            # pattern computation is tested separately.
            # assume that one dim weights are biases, drop them.
            patterns = [x for x in model.get_weights()
                        if len(x.shape) > 1]
            return PatternAttribution(model, patterns=patterns)

>       dryrun.test_analyzer(method, "mnist.*")

innvestigate/tests/analyzer/test_pattern_based.py:105: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

method = <function test_precommit__PatternAttribution.<locals>.method at 0x7fc308f9a0d0>
network_filter = 'mnist.*'

    def test_analyzer(method, network_filter):
        # todo: Mixing of pytest and unittest is not ideal.
        # Move completely to pytest.
        test_case = AnalyzerTestCase(method=method,
                                     network_filter=network_filter)
        test_result = unittest.TextTestRunner().run(test_case)
>       assert len(test_result.errors) == 0
E       AssertionError

innvestigate/utils/tests/dryrun.py:123: AssertionError
---------------------------------------- Captured stderr call -----------------------------------------
2018-06-15 18:38:47.929515: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:47.929543: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:47.929566: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:47.929573: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:47.929578: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:47.929583: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:47.929697: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:49.099660: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at reshape_op.h:51 : Invalid argument: Size 1 must be non-negative, not -7
2018-06-15 18:38:49.277834: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:49.277863: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:49.277890: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:49.277898: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:49.277904: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:49.277910: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:49.278219: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:50.536397: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at reshape_op.h:51 : Invalid argument: Size 1 must be non-negative, not -7
2018-06-15 18:38:50.702087: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:50.702122: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:50.702149: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:50.702156: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:50.702162: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:50.702167: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:50.702292: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:51.948884: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at reshape_op.h:51 : Invalid argument: Size 1 must be non-negative, not -8
2018-06-15 18:38:52.175495: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:52.175537: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:52.175562: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:52.175569: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:52.175574: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:52.175578: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:52.175694: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:53.885173: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at reshape_op.h:51 : Invalid argument: Size 1 must be non-negative, not -8
2018-06-15 18:38:53.988646: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:53.988680: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:53.988703: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:53.988710: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:53.988715: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:53.988719: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:53.988843: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:54.322100: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:54.322130: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:54.322152: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:54.322159: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:54.322164: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:54.322169: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:54.322288: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)
2018-06-15 18:38:54.931217: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1420] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda multiprocessor count: 6. The minimum required count is 8. You can adjust this requirement with the env var TF_MIN_GPU_MULTIPROCESSOR_COUNT.
2018-06-15 18:38:54.931246: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0
2018-06-15 18:38:54.931272: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-06-15 18:38:54.931287: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929]      0 1 
2018-06-15 18:38:54.931294: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0:   N N 
2018-06-15 18:38:54.931299: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1:   N N 
2018-06-15 18:38:54.931420: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11370 MB memory) -> physical GPU (device: 0, name: TITAN Xp, pci bus id: 0000:04:00.0, compute capability: 6.1)

======================================================================
ERROR: runTest (innvestigate.utils.tests.dryrun.AnalyzerTestCase) (network_name='mnist.cnn_1convb_2dense')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 83, in runTest
    self._apply_test(network)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 110, in _apply_test
    analysis = analyzer.analyze(x)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/analyzer/base.py", line 392, in analyze
    ret = self._analyzer_model.predict_on_batch(X)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/training.py", line 1945, in predict_on_batch
    outputs = self.predict_function(ins)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2482, in __call__
    **self.session_kwargs)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]

======================================================================
ERROR: runTest (innvestigate.utils.tests.dryrun.AnalyzerTestCase) (network_name='mnist.cnn_2convb_2dense')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 83, in runTest
    self._apply_test(network)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 110, in _apply_test
    analysis = analyzer.analyze(x)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/analyzer/base.py", line 392, in analyze
    ret = self._analyzer_model.predict_on_batch(X)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/training.py", line 1945, in predict_on_batch
    outputs = self.predict_function(ins)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2482, in __call__
    **self.session_kwargs)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -7
     [[Node: project_7/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_7/add, project_7/truediv-1-ReshapeConst-LayoutOptimizer)]]

======================================================================
ERROR: runTest (innvestigate.utils.tests.dryrun.AnalyzerTestCase) (network_name='mnist.cnn_2convb_3dense')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -8
     [[Node: project_9/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_9/add, project_9/truediv-1-ReshapeConst-LayoutOptimizer)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 83, in runTest
    self._apply_test(network)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 110, in _apply_test
    analysis = analyzer.analyze(x)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/analyzer/base.py", line 392, in analyze
    ret = self._analyzer_model.predict_on_batch(X)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/training.py", line 1945, in predict_on_batch
    outputs = self.predict_function(ins)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2482, in __call__
    **self.session_kwargs)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -8
     [[Node: project_9/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_9/add, project_9/truediv-1-ReshapeConst-LayoutOptimizer)]]

======================================================================
ERROR: runTest (innvestigate.utils.tests.dryrun.AnalyzerTestCase) (network_name='mnist.cnn_3convb_3dense')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1322, in _do_call
    return fn(*args)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1307, in _run_fn
    options, feed_dict, fetch_list, target_list, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1409, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -8
     [[Node: project_9/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_9/add, project_9/truediv-1-ReshapeConst-LayoutOptimizer)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 83, in runTest
    self._apply_test(network)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/utils/tests/dryrun.py", line 110, in _apply_test
    analysis = analyzer.analyze(x)
  File "/home/lapuschkin/Desktop/innvestigate-lrp-wip/innvestigate/innvestigate/analyzer/base.py", line 392, in analyze
    ret = self._analyzer_model.predict_on_batch(X)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/engine/training.py", line 1945, in predict_on_batch
    outputs = self.predict_function(ins)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/Keras-2.1.6-py3.5.egg/keras/backend/tensorflow_backend.py", line 2482, in __call__
    **self.session_kwargs)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
    run_metadata_ptr)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
    feed_dict_tensor, options, run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
    run_metadata)
  File "/home/lapuschkin/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Size 1 must be non-negative, not -8
     [[Node: project_9/truediv-1-ReshapeNHWCToNCHW-LayoutOptimizer = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"](project_9/add, project_9/truediv-1-ReshapeConst-LayoutOptimizer)]]

----------------------------------------------------------------------
Ran 1 test in 7.757s

FAILED (errors=4)
=================== 2 failed, 77 passed, 4 skipped, 8 deselected in 144.01 seconds ====================
albermax commented 6 years ago

Fixed. The tests pass now. From now on we require TF==1.8.

sebastian-lapuschkin commented 6 years ago

still fails. did you push?

albermax commented 6 years ago

No, sorry. Forgot about it. Now.