paulgavrikov / visualkeras

Visualkeras is a Python package to help visualize Keras (either standalone or included in TensorFlow) neural network architectures. It allows easy styling to fit most needs. This module supports layered style architecture generation which is great for CNNs (Convolutional Neural Networks), and a graph style architecture, which works great for most models including plain feed-forward networks.
MIT License
567 stars 67 forks source link

[BUG] Error when visualize Movinet #10

Closed Mob97 closed 2 years ago

Mob97 commented 3 years ago

Describe the bug I tried to visualize MoviNet model then I got this error. I guess that because of the casual convolution.

Traceback (most recent call last):
  File "visulize_model.py", line 14, in <module>
    visualkeras.layered_view(model, to_file='output.png') # write to disk
  File "/*/*/*/*/*/python3.7/site-packages/visualkeras/layered.py", line 94, in layered_view
    x = min(max(shape[1] * scale_xy, x), max_xy)
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

Minimal Code To Reproduce

visualkeras.layered_view(model, to_file='output.png')

Environment (please complete the following information):

paulgavrikov commented 3 years ago

@Mob97 how did you install visualkeras and which version are you testing?

Mob97 commented 3 years ago

@Mob97 how did you install visualkeras and which version are you testing?

I installed by pipy (pip install visualkeras) and I think I'm using visualkeras 0.0.2.

paulgavrikov commented 3 years ago

@Mob97 Could you try the latest master and see if the error persists? I recently fixed a bug related to invalid shapes but I am not sure if this is the same issue: pip install -U git+https://github.com/paulgavrikov/visualkeras

Also, could you please provide the model.summary() log?

github-actions[bot] commented 3 years ago

Stale issue message

github-actions[bot] commented 2 years ago

Stale issue message