DLS 2.5.0] ImportError: cannot import name 'ResNet50'

When I drag in pre-trained models in the model editor and connect them, I am not able to use the model and I get an error “ImportError: cannot import name ‘ResNet50’”. Trying to use InceptionV3 and other pre-trained models also gives the same error. I am running DLS on Ubuntu 18.04 LTS.

Starting Deep Learning Studio...Starting redis-server: redis-server.
 * Starting nginx nginx
   ...done.
Not supported
libcuda.so.1: cannot open shared object file: No such file or directory
skipping cifar dataset download!
skipping IMDB dataset download!
skipping MNIST dataset download!
skipping reuters dataset download!
No changes detected
Using MXNet backend.
/usr/local/lib/python3.5/dist-packages/allauth/account/templatetags/account_tags.py:4: DeprecationWarning: {% load account_tags %} is deprecated, use {% load account %}
  DeprecationWarning)
/usr/local/lib/python3.5/dist-packages/allauth/socialaccount/templatetags/socialaccount_tags.py:4: DeprecationWarning: {% load socialaccount_tags %} is deprecated, use {% load socialaccount %}
  " {% load socialaccount %}", DeprecationWarning)
Operations to perform:
  Apply all migrations: account, admin, auth, authtoken, automl, contenttypes, environments, project, projects, reversion, sessions, sites, socialaccount
Running migrations:
  No migrations to apply.
Using MXNet backend.
/usr/local/lib/python3.5/dist-packages/allauth/account/templatetags/account_tags.py:4: DeprecationWarning: {% load account_tags %} is deprecated, use {% load account %}
  DeprecationWarning)
/usr/local/lib/python3.5/dist-packages/allauth/socialaccount/templatetags/socialaccount_tags.py:4: DeprecationWarning: {% load socialaccount_tags %} is deprecated, use {% load socialaccount %}
  " {% load socialaccount %}", DeprecationWarning)
ln: failed to create symbolic link '/var/www/files/data': File exists
[2019-09-17 18:56:13 +0000] [108] [INFO] Starting gunicorn 19.6.0
[2019-09-17 18:56:13 +0000] [108] [INFO] Listening at: http://127.0.0.1:8000 (108)
[2019-09-17 18:56:13 +0000] [108] [INFO] Using worker: threads
[2019-09-17 18:56:13 +0000] [123] [INFO] Booting worker with pid: 123
[I 18:56:15.630 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.5/dist-packages/jupyterlab
[I 18:56:15.631 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[W 18:56:15.640 LabApp] JupyterLab server extension not enabled, manually loading...
[I 18:56:15.642 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.5/dist-packages/jupyterlab
[I 18:56:15.643 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 18:56:15.649 LabApp] Serving notebooks from local directory: /data/1
[I 18:56:15.650 LabApp] The Jupyter Notebook is running at:
[I 18:56:15.650 LabApp] http://(bc7547b9274a or 127.0.0.1):8888/?token=...
[I 18:56:15.651 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 18:56:15.654 LabApp] No web browser found: could not locate runnable browser.
Using MXNet backend.
 * Running on http://127.0.0.1:6666/ (Press CTRL+C to quit)
Using MXNet backend.
/usr/lib/python3/dist-packages/pandas/__init__.py:7: DeprecationWarning: bad escape \s
  from pandas import hashtable, tslib, lib
/usr/local/lib/python3.5/dist-packages/allauth/account/templatetags/account_tags.py:4: DeprecationWarning: {% load account_tags %} is deprecated, use {% load account %}
  DeprecationWarning)
/usr/local/lib/python3.5/dist-packages/allauth/socialaccount/templatetags/socialaccount_tags.py:4: DeprecationWarning: {% load socialaccount_tags %} is deprecated, use {% load socialaccount %}
  " {% load socialaccount %}", DeprecationWarning)
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 119, in _obtain_input_shape
    '`input_shape=' + str(input_shape) + '`')
ValueError: The input must have 3 channels; got `input_shape=(1, 28, 28)`

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 119, in _obtain_input_shape
    '`input_shape=' + str(input_shape) + '`')
ValueError: The input must have 3 channels; got `input_shape=(1, 28, 28)`

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 119, in _obtain_input_shape
    '`input_shape=' + str(input_shape) + '`')
ValueError: The input must have 3 channels; got `input_shape=(1, 28, 28)`

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 133, in _obtain_input_shape
    '`input_shape=' + str(input_shape) + '`')
ValueError: The input must have 3 channels; got `input_shape=(28, 28, 1)`

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 133, in _obtain_input_shape
    '`input_shape=' + str(input_shape) + '`')
ValueError: The input must have 3 channels; got `input_shape=(28, 28, 1)`

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 133, in _obtain_input_shape
    '`input_shape=' + str(input_shape) + '`')
ValueError: The input must have 3 channels; got `input_shape=(28, 28, 1)`

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 133, in _obtain_input_shape
    '`input_shape=' + str(input_shape) + '`')
ValueError: The input must have 3 channels; got `input_shape=(28, 28, 1)`

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 584, in project.network.getOutputShapes (project/network.c:15455)
  File "project/network.py", line 46, in project.network.jsonToGraph (project/network.c:2387)
KeyError: 'source'
Traceback (most recent call last):
  File "project/network.py", line 584, in project.network.getOutputShapes (project/network.c:15455)
  File "project/network.py", line 46, in project.network.jsonToGraph (project/network.c:2387)
KeyError: 'source'
Traceback (most recent call last):
  File "project/network.py", line 584, in project.network.getOutputShapes (project/network.c:15455)
  File "project/network.py", line 46, in project.network.jsonToGraph (project/network.c:2387)
KeyError: 'source'
Traceback (most recent call last):
  File "project/network.py", line 584, in project.network.getOutputShapes (project/network.c:15455)
  File "project/network.py", line 46, in project.network.jsonToGraph (project/network.c:2387)
KeyError: 'source'
Traceback (most recent call last):
  File "project/network.py", line 584, in project.network.getOutputShapes (project/network.c:15455)
  File "project/network.py", line 46, in project.network.jsonToGraph (project/network.c:2387)
KeyError: 'source'
Traceback (most recent call last):
  File "project/network.py", line 584, in project.network.getOutputShapes (project/network.c:15455)
  File "project/network.py", line 46, in project.network.jsonToGraph (project/network.c:2387)
KeyError: 'source'
Traceback (most recent call last):
  File "project/network.py", line 584, in project.network.getOutputShapes (project/network.c:15455)
  File "project/network.py", line 46, in project.network.jsonToGraph (project/network.c:2387)
KeyError: 'source'
Traceback (most recent call last):
  File "project/network.py", line 584, in project.network.getOutputShapes (project/network.c:15455)
  File "project/network.py", line 46, in project.network.jsonToGraph (project/network.c:2387)
KeyError: 'source'
Traceback (most recent call last):
  File "project/network.py", line 584, in project.network.getOutputShapes (project/network.c:15455)
  File "project/network.py", line 46, in project.network.jsonToGraph (project/network.c:2387)
KeyError: 'source'
Traceback (most recent call last):
  File "project/network.py", line 584, in project.network.getOutputShapes (project/network.c:15455)
  File "project/network.py", line 46, in project.network.jsonToGraph (project/network.c:2387)
KeyError: 'source'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 110, in _obtain_input_shape
    '`input_shape` should be ' + str(default_shape) + '.')
ValueError: When setting`include_top=True`, `input_shape` should be (3, 224, 224).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 110, in _obtain_input_shape
    '`input_shape` should be ' + str(default_shape) + '.')
ValueError: When setting`include_top=True`, `input_shape` should be (3, 224, 224).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 110, in _obtain_input_shape
    '`input_shape` should be ' + str(default_shape) + '.')
ValueError: When setting`include_top=True`, `input_shape` should be (3, 224, 224).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 110, in _obtain_input_shape
    '`input_shape` should be ' + str(default_shape) + '.')
ValueError: When setting`include_top=True`, `input_shape` should be (3, 224, 224).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "project/network.py", line 608, in project.network.getOutputShapes (project/network.c:16212)
  File "project/network.py", line 562, in project.network.getLayerOutputShape (project/network.c:14927)
  File "<string>", line 1, in <module>
ImportError: cannot import name 'ResNet50'
Traceback (most recent call last):
  File "project/network.py", line 560, in project.network.getLayerOutputShape (project/network.c:14875)
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/resnet50.py", line 161, in ResNet50
    include_top=include_top)
  File "/usr/local/lib/python3.5/dist-packages/keras/applications/imagenet_utils.py", line 119, in _obtain_input_shape
    '`input_shape=' + str(input_shape) + '`')
ValueError: The input must have 3 channels; got `input_shape=(1, 28, 28)`