Open universvm opened 5 years ago
Any updates on this? Are you planning on supporting 1d convolutions as well?
Maybe it could be integrated with Netron? See: https://github.com/lutzroeder/netron
@universvm, I am having the same idea as you do but after a small consideration, it may be a hard task to do because of a few reasons.
If I happen to use the project more, I will consider creating such a piece of code on my own. At the moment I have other things to do but I can help in creating the code in my spare time if someone needs help.
Cheers.
Recently came across this tool while exploring different model visualizations. I really like the look of the examples, but it would be amazing to just plug in a keras model directly, similar to Net2Vis, VisualKeras, etc. Any chance there's a plan to revisit this issue?
Hey there!
Great work on the project, I think this is one of the best out there.
I've been thinking about possibly automating the plotting process. Keras / Tensorflow allow to transform a model object to a dictionary. So for instance, the code:
returns:
{'name': 'sequential', 'layers': [{'class_name': 'Flatten', 'config': {'name': 'flatten', 'trainable': True, 'batch_input_shape': (None, 28, 28), 'dtype': 'float32', 'data_format': 'channels_last'}}, {'class_name': 'Dense', 'config': {'name': 'dense', 'trainable': True, 'dtype': 'float32', 'units': 512, 'activation': 'relu', 'use_bias': True, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'scale': 1.0, 'mode': 'fan_avg', 'distribution': 'uniform', 'seed': None, 'dtype': 'float32'}}, 'bias_initializer': {'class_name': 'Zeros', 'config': {'dtype': 'float32'}}, 'kernel_regularizer': None, 'bias_regularizer': None, 'activity_regularizer': None, 'kernel_constraint': None, 'bias_constraint': None}}, {'class_name': 'Dropout', 'config': {'name': 'dropout', 'trainable': True, 'dtype': 'float32', 'rate': 0.2, 'noise_shape': None, 'seed': None}}, {'class_name': 'Dense', 'config': {'name': 'dense_1', 'trainable': True, 'dtype': 'float32', 'units': 10, 'activation': 'softmax', 'use_bias': True, 'kernel_initializer': {'class_name': 'VarianceScaling', 'config': {'scale': 1.0, 'mode': 'fan_avg', 'distribution': 'uniform', 'seed': None, 'dtype': 'float32'}}, 'bias_initializer': {'class_name': 'Zeros', 'config': {'dtype': 'float32'}}, 'kernel_regularizer': None, 'bias_regularizer': None, 'activity_regularizer': None, 'kernel_constraint': None, 'bias_constraint': None}}]}
Documentation here: https://keras.io/models/about-keras-models/
I think this is fairly parsable and could avoid having to manually write the layers. I'm quite busy these months but I might be able to do it over Christmas unless anyone else takes the lead.