9 Replies
      Latest reply on Aug 18, 2017 1:13 AM by langju
      3DTOPO Level 1 Level 1 (0 points)

        I installed coremltools and when I try to import coremltools into python I am getting this error:

        Python 2.7.10 (default, Oct 23 2015, 19:19:21)
        [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
        Type "help", "copyright", "credits" or "license" for more information.
        >>> import coremltools
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          File "/Library/Python/2.7/site-packages/coremltools/__init__.py", line 29, in <module>
            import converters
          File "/Library/Python/2.7/site-packages/coremltools/converters/__init__.py", line 10, in <module>
            import keras
          File "/Library/Python/2.7/site-packages/coremltools/converters/keras/__init__.py", line 15, in <module>
            from ._keras_converter import convert
          File "/Library/Python/2.7/site-packages/coremltools/converters/keras/_keras_converter.py", line 17, in <module>
            import _topology
          File "/Library/Python/2.7/site-packages/coremltools/converters/keras/_topology.py", line 24, in <module>
            _keras.layers.advanced_activations.ParametricSoftplus,
        AttributeError: 'module' object has no attribute 'ParametricSoftplus'
        

         

        Keras info:

        >>> import keras
        >>> print keras.__version__
        2.0.4
        >>> print keras.__path__
        ['/Library/Python/2.7/site-packages/keras']
        

         

        Any ideas how to get coremltools working?