We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
TensorFlow einsum behavior change
# Description

In the test suite the `test_einsum[tensorflow]` [test is failing](https://travis-ci.org/diana-hep/pyhf/jobs/548493214#L689-L714) for `tensorflow` `v1.14.0`.

# Expected Behavior

`test_einsum[tensorflow]` passes

# Actual Behavior

```
backend = (<pyhf.tensor.tensorflow_backend.tensorflow_backend object at 0x7f11de50be10>, None)
    def test_einsum(backend):
        tb = pyhf.tensorlib
        x = np.arange(20).reshape(5, 4).tolist()
    
        if isinstance(pyhf.tensorlib, pyhf.tensor.mxnet_backend):
            with pytest.raises(NotImplementedError):
                assert tb.einsum('ij->ji', [1, 2, 3])
        else:
>           assert np.all(tb.tolist(tb.einsum('ij->ji', x)) == np.asarray(x).T.tolist())
tests/test_tensor.py:200: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pyhf/tensor/tensorflow_backend.py:260: in einsum
    return tf.einsum(subscripts, *operands)
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/tensorflow/python/ops/special_math_ops.py:255: in einsum
    input_shapes = [x.get_shape() for x in inputs]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.0 = <list_iterator object at 0x7f11cc06bb38>
>   input_shapes = [x.get_shape() for x in inputs]
E   AttributeError: 'list' object has no attribute 'get_shape'
```

# Steps to Reproduce

Run the test suite.

```
pytest -s tests/test_tensor.py
```

# Checklist

- [x] Run `git fetch` to get the most up to date version of `master`
- [x] Searched through existing Issues to confirm this is not a duplicate issue
- [x] Filled out the Description, Expected Behavior, Actual Behavior, and Steps to Reproduce sections above or have edited/removed them in a way that fully describes the issue


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 #!/usr/bin/env python
2 
3 from setuptools import setup, find_packages
4 from os import path
5 import sys
6 
7 this_directory = path.abspath(path.dirname(__file__))
8 if sys.version_info.major < 3:
9     from io import open
10 with open(path.join(this_directory, 'README.md'), encoding='utf-8') as readme_md:
11     long_description = readme_md.read()
12 
13 extras_require = {
14     'tensorflow': [
15         'tensorflow~=1.13',
16         'tensorflow-probability~=0.5',
17         'numpy<=1.14.5,>=1.14.0',  # Lower of 1.14.0 instead of 1.13.3 to ensure doctest pass
18         'setuptools<=39.1.0',
19     ],
20     'torch': ['torch~=1.0'],
21     'mxnet': ['mxnet~=1.0', 'requests~=2.18.4', 'numpy<1.15.0,>=1.8.2'],
22     # 'dask': [
23     #     'dask[array]'
24     # ],
25     'xmlio': ['uproot'],
26     'minuit': ['iminuit'],
27     'develop': [
28         'pyflakes',
29         'pytest~=3.5',
30         'pytest-cov>=2.5.1',
31         'pytest-mock',
32         'pytest-benchmark[histogram]',
33         'pytest-console-scripts',
34         'python-coveralls',
35         'coverage>=4.0',  # coveralls
36         'matplotlib',
37         'jupyter',
38         'nbdime',
39         'uproot~=3.3',
40         'papermill~=1.0',
41         'nteract-scrapbook~=0.2',
42         'graphviz',
43         'bumpversion',
44         'sphinx',
45         'sphinxcontrib-bibtex',
46         'sphinxcontrib-napoleon',
47         'sphinx_rtd_theme',
48         'nbsphinx',
49         'sphinx-issues',
50         'm2r',
51         'jsonpatch',
52         'ipython<7',  # jupyter_console and ipython clash in dependency requirement -- downgrade ipython for now
53         'pre-commit',
54         'black;python_version>="3.6"',  # Black is Python3 only
55         'twine',
56     ],
57 }
58 extras_require['complete'] = sorted(set(sum(extras_require.values(), [])))
59 
60 
61 def _is_test_pypi():
62     """
63     Determine if the Travis CI environment has TESTPYPI_UPLOAD defined and
64     set to true (c.f. .travis.yml)
65 
66     The use_scm_version kwarg accepts a callable for the local_scheme
67     configuration parameter with argument "version". This can be replaced
68     with a lambda as the desired version structure is {next_version}.dev{distance}
69     c.f. https://github.com/pypa/setuptools_scm/#importing-in-setuppy
70 
71     As the scm versioning is only desired for TestPyPI, for depolyment to PyPI the version
72     controlled through bumpversion is used.
73     """
74     from os import getenv
75 
76     return (
77         {'local_scheme': lambda version: ''}
78         if getenv('TESTPYPI_UPLOAD') == 'true'
79         else False
80     )
81 
82 
83 setup(
84     name='pyhf',
85     version='0.1.0',
86     description='(partial) pure python histfactory implementation',
87     long_description=long_description,
88     long_description_content_type='text/markdown',
89     url='https://github.com/diana-hep/pyhf',
90     author='Lukas Heinrich',
91     author_email='lukas.heinrich@cern.ch',
92     license='Apache',
93     keywords='physics fitting numpy scipy tensorflow pytorch mxnet dask',
94     classifiers=[
95         "Programming Language :: Python :: 2",
96         "Programming Language :: Python :: 2.7",
97         "Programming Language :: Python :: 3",
98         "Programming Language :: Python :: 3.6",
99         "Programming Language :: Python :: 3.7",
100     ],
101     packages=find_packages(),
102     include_package_data=True,
103     python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*",
104     install_requires=[
105         'scipy',  # requires numpy, which is required by pyhf, tensorflow, and mxnet
106         'click>=6.0',  # for console scripts,
107         'tqdm',  # for readxml
108         'six',  # for modifiers
109         'jsonschema>=v3.0.0a2',  # for utils, alpha-release for draft 6
110         'jsonpatch',
111         'pyyaml',  # for parsing CLI equal-delimited options
112     ],
113     extras_require=extras_require,
114     entry_points={'console_scripts': ['pyhf=pyhf.commandline:pyhf']},
115     dependency_links=[],
116     use_scm_version=_is_test_pypi(),
117 )
118
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@
 
 extras_require = {
     'tensorflow': [
-        'tensorflow~=1.13',
+        'tensorflow~=1.14',
         'tensorflow-probability~=0.5',
         'numpy<=1.14.5,>=1.14.0',  # Lower of 1.14.0 instead of 1.13.3 to ensure doctest pass
         'setuptools<=39.1.0',

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -12,7 +12,7 @@\n \n extras_require = {\n     'tensorflow': [\n-        'tensorflow~=1.13',\n+        'tensorflow~=1.14',\n         'tensorflow-probability~=0.5',\n         'numpy<=1.14.5,>=1.14.0',  # Lower of 1.14.0 instead of 1.13.3 to ensure doctest pass\n         'setuptools<=39.1.0',\n", "issue": "TensorFlow einsum behavior change\n# Description\r\n\r\nIn the test suite the `test_einsum[tensorflow]` [test is failing](https://travis-ci.org/diana-hep/pyhf/jobs/548493214#L689-L714) for `tensorflow` `v1.14.0`.\r\n\r\n# Expected Behavior\r\n\r\n`test_einsum[tensorflow]` passes\r\n\r\n# Actual Behavior\r\n\r\n```\r\nbackend = (<pyhf.tensor.tensorflow_backend.tensorflow_backend object at 0x7f11de50be10>, None)\r\n    def test_einsum(backend):\r\n        tb = pyhf.tensorlib\r\n        x = np.arange(20).reshape(5, 4).tolist()\r\n    \r\n        if isinstance(pyhf.tensorlib, pyhf.tensor.mxnet_backend):\r\n            with pytest.raises(NotImplementedError):\r\n                assert tb.einsum('ij->ji', [1, 2, 3])\r\n        else:\r\n>           assert np.all(tb.tolist(tb.einsum('ij->ji', x)) == np.asarray(x).T.tolist())\r\ntests/test_tensor.py:200: \r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\npyhf/tensor/tensorflow_backend.py:260: in einsum\r\n    return tf.einsum(subscripts, *operands)\r\n../../../virtualenv/python3.6.3/lib/python3.6/site-packages/tensorflow/python/ops/special_math_ops.py:255: in einsum\r\n    input_shapes = [x.get_shape() for x in inputs]\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \r\n.0 = <list_iterator object at 0x7f11cc06bb38>\r\n>   input_shapes = [x.get_shape() for x in inputs]\r\nE   AttributeError: 'list' object has no attribute 'get_shape'\r\n```\r\n\r\n# Steps to Reproduce\r\n\r\nRun the test suite.\r\n\r\n```\r\npytest -s tests/test_tensor.py\r\n```\r\n\r\n# Checklist\r\n\r\n- [x] Run `git fetch` to get the most up to date version of `master`\r\n- [x] Searched through existing Issues to confirm this is not a duplicate issue\r\n- [x] Filled out the Description, Expected Behavior, Actual Behavior, and Steps to Reproduce sections above or have edited/removed them in a way that fully describes the issue\r\n\n", "before_files": [{"content": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom os import path\nimport sys\n\nthis_directory = path.abspath(path.dirname(__file__))\nif sys.version_info.major < 3:\n    from io import open\nwith open(path.join(this_directory, 'README.md'), encoding='utf-8') as readme_md:\n    long_description = readme_md.read()\n\nextras_require = {\n    'tensorflow': [\n        'tensorflow~=1.13',\n        'tensorflow-probability~=0.5',\n        'numpy<=1.14.5,>=1.14.0',  # Lower of 1.14.0 instead of 1.13.3 to ensure doctest pass\n        'setuptools<=39.1.0',\n    ],\n    'torch': ['torch~=1.0'],\n    'mxnet': ['mxnet~=1.0', 'requests~=2.18.4', 'numpy<1.15.0,>=1.8.2'],\n    # 'dask': [\n    #     'dask[array]'\n    # ],\n    'xmlio': ['uproot'],\n    'minuit': ['iminuit'],\n    'develop': [\n        'pyflakes',\n        'pytest~=3.5',\n        'pytest-cov>=2.5.1',\n        'pytest-mock',\n        'pytest-benchmark[histogram]',\n        'pytest-console-scripts',\n        'python-coveralls',\n        'coverage>=4.0',  # coveralls\n        'matplotlib',\n        'jupyter',\n        'nbdime',\n        'uproot~=3.3',\n        'papermill~=1.0',\n        'nteract-scrapbook~=0.2',\n        'graphviz',\n        'bumpversion',\n        'sphinx',\n        'sphinxcontrib-bibtex',\n        'sphinxcontrib-napoleon',\n        'sphinx_rtd_theme',\n        'nbsphinx',\n        'sphinx-issues',\n        'm2r',\n        'jsonpatch',\n        'ipython<7',  # jupyter_console and ipython clash in dependency requirement -- downgrade ipython for now\n        'pre-commit',\n        'black;python_version>=\"3.6\"',  # Black is Python3 only\n        'twine',\n    ],\n}\nextras_require['complete'] = sorted(set(sum(extras_require.values(), [])))\n\n\ndef _is_test_pypi():\n    \"\"\"\n    Determine if the Travis CI environment has TESTPYPI_UPLOAD defined and\n    set to true (c.f. .travis.yml)\n\n    The use_scm_version kwarg accepts a callable for the local_scheme\n    configuration parameter with argument \"version\". This can be replaced\n    with a lambda as the desired version structure is {next_version}.dev{distance}\n    c.f. https://github.com/pypa/setuptools_scm/#importing-in-setuppy\n\n    As the scm versioning is only desired for TestPyPI, for depolyment to PyPI the version\n    controlled through bumpversion is used.\n    \"\"\"\n    from os import getenv\n\n    return (\n        {'local_scheme': lambda version: ''}\n        if getenv('TESTPYPI_UPLOAD') == 'true'\n        else False\n    )\n\n\nsetup(\n    name='pyhf',\n    version='0.1.0',\n    description='(partial) pure python histfactory implementation',\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    url='https://github.com/diana-hep/pyhf',\n    author='Lukas Heinrich',\n    author_email='lukas.heinrich@cern.ch',\n    license='Apache',\n    keywords='physics fitting numpy scipy tensorflow pytorch mxnet dask',\n    classifiers=[\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n    packages=find_packages(),\n    include_package_data=True,\n    python_requires=\">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*\",\n    install_requires=[\n        'scipy',  # requires numpy, which is required by pyhf, tensorflow, and mxnet\n        'click>=6.0',  # for console scripts,\n        'tqdm',  # for readxml\n        'six',  # for modifiers\n        'jsonschema>=v3.0.0a2',  # for utils, alpha-release for draft 6\n        'jsonpatch',\n        'pyyaml',  # for parsing CLI equal-delimited options\n    ],\n    extras_require=extras_require,\n    entry_points={'console_scripts': ['pyhf=pyhf.commandline:pyhf']},\n    dependency_links=[],\n    use_scm_version=_is_test_pypi(),\n)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\n\nfrom setuptools import setup, find_packages\nfrom os import path\nimport sys\n\nthis_directory = path.abspath(path.dirname(__file__))\nif sys.version_info.major < 3:\n    from io import open\nwith open(path.join(this_directory, 'README.md'), encoding='utf-8') as readme_md:\n    long_description = readme_md.read()\n\nextras_require = {\n    'tensorflow': [\n        'tensorflow~=1.14',\n        'tensorflow-probability~=0.5',\n        'numpy<=1.14.5,>=1.14.0',  # Lower of 1.14.0 instead of 1.13.3 to ensure doctest pass\n        'setuptools<=39.1.0',\n    ],\n    'torch': ['torch~=1.0'],\n    'mxnet': ['mxnet~=1.0', 'requests~=2.18.4', 'numpy<1.15.0,>=1.8.2'],\n    # 'dask': [\n    #     'dask[array]'\n    # ],\n    'xmlio': ['uproot'],\n    'minuit': ['iminuit'],\n    'develop': [\n        'pyflakes',\n        'pytest~=3.5',\n        'pytest-cov>=2.5.1',\n        'pytest-mock',\n        'pytest-benchmark[histogram]',\n        'pytest-console-scripts',\n        'python-coveralls',\n        'coverage>=4.0',  # coveralls\n        'matplotlib',\n        'jupyter',\n        'nbdime',\n        'uproot~=3.3',\n        'papermill~=1.0',\n        'nteract-scrapbook~=0.2',\n        'graphviz',\n        'bumpversion',\n        'sphinx',\n        'sphinxcontrib-bibtex',\n        'sphinxcontrib-napoleon',\n        'sphinx_rtd_theme',\n        'nbsphinx',\n        'sphinx-issues',\n        'm2r',\n        'jsonpatch',\n        'ipython<7',  # jupyter_console and ipython clash in dependency requirement -- downgrade ipython for now\n        'pre-commit',\n        'black;python_version>=\"3.6\"',  # Black is Python3 only\n        'twine',\n    ],\n}\nextras_require['complete'] = sorted(set(sum(extras_require.values(), [])))\n\n\ndef _is_test_pypi():\n    \"\"\"\n    Determine if the Travis CI environment has TESTPYPI_UPLOAD defined and\n    set to true (c.f. .travis.yml)\n\n    The use_scm_version kwarg accepts a callable for the local_scheme\n    configuration parameter with argument \"version\". This can be replaced\n    with a lambda as the desired version structure is {next_version}.dev{distance}\n    c.f. https://github.com/pypa/setuptools_scm/#importing-in-setuppy\n\n    As the scm versioning is only desired for TestPyPI, for depolyment to PyPI the version\n    controlled through bumpversion is used.\n    \"\"\"\n    from os import getenv\n\n    return (\n        {'local_scheme': lambda version: ''}\n        if getenv('TESTPYPI_UPLOAD') == 'true'\n        else False\n    )\n\n\nsetup(\n    name='pyhf',\n    version='0.1.0',\n    description='(partial) pure python histfactory implementation',\n    long_description=long_description,\n    long_description_content_type='text/markdown',\n    url='https://github.com/diana-hep/pyhf',\n    author='Lukas Heinrich',\n    author_email='lukas.heinrich@cern.ch',\n    license='Apache',\n    keywords='physics fitting numpy scipy tensorflow pytorch mxnet dask',\n    classifiers=[\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n    ],\n    packages=find_packages(),\n    include_package_data=True,\n    python_requires=\">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*\",\n    install_requires=[\n        'scipy',  # requires numpy, which is required by pyhf, tensorflow, and mxnet\n        'click>=6.0',  # for console scripts,\n        'tqdm',  # for readxml\n        'six',  # for modifiers\n        'jsonschema>=v3.0.0a2',  # for utils, alpha-release for draft 6\n        'jsonpatch',\n        'pyyaml',  # for parsing CLI equal-delimited options\n    ],\n    extras_require=extras_require,\n    entry_points={'console_scripts': ['pyhf=pyhf.commandline:pyhf']},\n    dependency_links=[],\n    use_scm_version=_is_test_pypi(),\n)\n", "path": "setup.py"}]}