Computer Vision News - January 2022
16 Deep Learning Tool Visual Keras Probably the fastest tool to draw a Keras model. Just add these lines to your code to employ the Visualkeras package, and automatically create and save a diagram on your disk with the specified filename. pip install visualkeras import visualkeras visualkeras.layered_view(vgg) visualkeras.layered_view(vgg, to_file=’vgg_diagram.png’).show() # write and show Net2Vis This is a web tool that allows to upload a Keras model or directly copy paste the code on the left panel. The script needs to contain a get_model function which returns the model to draw. Below, we wrote such a function for the vgg16 architecture. # You can freely modify this file. # However, you need to have a function that is named get_model and returns a Keras Model. import keras , os from keras.models import Sequential from keras.layers import Dense, Conv2D, MaxPool2D , Flatten from keras.preprocessing.image import ImageDataGenerator import numpy as np
Made with FlippingBook
RkJQdWJsaXNoZXIy NTc3NzU=