visualkeras icon indicating copy to clipboard operation
visualkeras copied to clipboard

[BUG]

Open Jeff-Winchell opened this issue 1 year ago • 4 comments

both graph_view and layered_view failed to work. I see no updates to this code in 2 years so it seems like a dead project.

2 visualkeras.graph_view(model).show() File ~\miniconda3\envs\NLP_TF\lib\site-packages\visualkeras\layer_utils.py:39, in model_to_adj_matrix(model) 37 if not model.built: 38 model.build() ---> 39 layers = model._layers 41 adj_matrix = np.zeros((len(layers), len(layers))) 42 id_to_num_mapping = dict()

AttributeError: 'Functional' object has no attribute '_layers'

File ~\miniconda3\envs\NLP_TF\lib\site-packages\visualkeras\graph.py:58, in graph_view(model, to_file, color_map, node_size, background_fill, padding, layer_spacing, node_spacing, connector_fill, connector_width, ellipsize_after, inout_as_tensor, show_neurons) 54 layer_y = list() 56 # Attach helper layers ---> 58 id_to_num_mapping, adj_matrix = model_to_adj_matrix(model) 59 model_layers = model_to_hierarchy_lists(model, id_to_num_mapping, adj_matrix) 61 # add fake output layers

 2 visualkeras.layered_view(model).show()

File ~\miniconda3\envs\NLP_TF\lib\site-packages\visualkeras\layered.py:100, in layered_view(model, to_file, min_z, min_xy, max_z, max_xy, scale_z, scale_xy, type_ignore, index_ignore, color_map, one_dim_orientation, background_fill, draw_volume, padding, spacing, draw_funnel, shade_step, legend, font, font_color) 98 x = min(max(shape[1] * scale_xy, x), max_xy) 99 y = min(max(shape[2] * scale_xy, y), max_xy) --> 100 z = min(max(z), max_z) 101 elif len(shape) == 2: 102 if one_dim_orientation == 'x':

TypeError: 'int' object is not iterable

Meanwhile graphviz is an installation nightmare so no usable visualization tools exist for deep learning with python. Sad.

Jeff-Winchell avatar Dec 02 '23 02:12 Jeff-Winchell

I have similar problem. Did you find another library since this one is not updated recently?

esrasiler avatar Dec 23 '23 17:12 esrasiler

no

Jeff-Winchell avatar Dec 23 '23 20:12 Jeff-Winchell

I have similar problem.

sevginurbilgin avatar Jan 01 '24 19:01 sevginurbilgin

same issue, did anyone figure how to solve this?

0xArwa avatar Jan 09 '24 00:01 0xArwa

Stale issue message

github-actions[bot] avatar Mar 09 '24 03:03 github-actions[bot]