Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with custom architecture #63

Open
fpramunno opened this issue Oct 10, 2024 · 1 comment
Open

Error with custom architecture #63

fpramunno opened this issue Oct 10, 2024 · 1 comment

Comments

@fpramunno
Copy link

Hi,
I found that with this line of code:

z = min(max(int(self_multiply(shape[0:1] + shape[3:]) * scale_z), z), max_z)

I have the following error:

Traceback (most recent call last):

Cell In[3], line 1
img = visualtorch.layered_view(model, input_shape=input_shape, spacing=50)

File ~\anaconda3\lib\site-packages\visualtorch\layered.py:124 in layered_view
layer_y, layer_types, boxes, x_off, img_height, max_right = _create_architecture(

File ~\anaconda3\lib\site-packages\visualtorch\layered.py:324 in _create_architecture
z = min(max(int(self_multiply(shape[0:1] + shape[3:]) * scale_z), z), max_z)

TypeError: 'int' object is not iterable

So switching to:
z = min(max(int(np.prod(self_multiply(shape[0:1] + shape[3:])) * scale_z), z), max_z)

it works.

fpr

@willyfh
Copy link
Owner

willyfh commented Nov 23, 2024

Hi, I’m sorry for my late response. Would it be possible to provide the custom architecture (or a similar one) so we can reproduce the reported bug? Thank you! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants