Keras: only display NN-architecture without model memory allocation
My goal is to use Keras to visualise the architecture of the model. No training, no inference. For example if I just want to visualise the graph of the network of the classic VGG16-model with model = create_vgg_like_model() then Keras starts to pre-allocate the memory needed and the program crash (see image). PC specs: CPU with 4 cores, 8GB RAM. Due to the "huge" amount of parameters of the model it uses even the swap partition. I tried to play around with cpu_devices = tf.config.list_physical_devices('CPU') if cpu_devices: try: # avoid allocating all memory on the device tf.config.set_visible
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.