brianlow / keras_diagram

Keras models as ASCII diagrams
29 stars 6 forks source link

AttributeError: 'function' object has no attribute 'func_name' #4

Closed vyraun closed 7 years ago

vyraun commented 7 years ago

Hi, while executing the babi_memnn.py file as in https://pypi.python.org/pypi/keras-diagram (on my Windows 10 system, python 3.5 and keras installed by pip):

I get the error:

Compiling... Traceback (most recent call last): File "k.py", line 198, in print(ascii(answer)) File "C:\Program Files\Anaconda2\envs\py35\lib\site-packages\keras_diagram\diagram.py", line 169, in ascii node = Node(model.layers[-1]) File "C:\Program Files\Anaconda2\envs\py35\lib\site-packages\keras_diagram\diagram.py", line 12, in init self.text = "%20s %-20s" % (self._name(), layer.output_shape) File "C:\Program Files\Anaconda2\envs\py35\lib\site-packages\keras_diagram\diagram.py", line 20, in _name return self.layer.activation.func_name.title() AttributeError: 'function' object has no attribute 'func_name'

@brianlow could you take a look? Thanks.

isaacgerg commented 7 years ago

I have this same issue. has this been fixed?

Windows 7, python 3.5, keras installed via pip

EDIT 1, looks like a PR has a fix for this but its not merged.

brianlow commented 7 years ago

Published version 1.0.3

brianlow commented 7 years ago

Feel free to re-open