@staticmethod<EOL><INDENT>def print_number_of_parameters():<DEDENT>
log.info('<STR_LIT>')<EOL>variables = tf.trainable_variables()<EOL>blocks = defaultdict(int)<EOL>for var in variables:<EOL><INDENT>block_name = var.name.split('<STR_LIT:/>')[<NUM_LIT:0>]<EOL>number_of_parameters = np.prod(var.get_shape().as_list())<EOL>blocks[block_name] += number_of_parameters<EOL><DEDENT>for block_name, cnt in blocks.items():<EOL><INDENT>log.info("<STR_LIT>".format(block_name, cnt))<EOL><DEDENT>total_num_parameters = np.sum(list(blocks.values()))<EOL>log.info('<STR_LIT>'.format(total_num_parameters))<EOL>
Print number of *trainable* parameters in the network