Skip to content

Error with custom architecture #63

Open
@fpramunno

Description

@fpramunno

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions