models/dense_net.py
def _count_trainable_params(self):
        """
        Uses TensorFlow commands to count the number of trainable parameters
        in the graph (sum of the multiplied dimensions of each TF variable).
        Then prints the number of parameters.
        """
        total_parameters = 0
        # print("Variable names:")
        for variable in tf.trainable_variables():
            # print(variable.name)
            shape = variable.get_shape()
            variable_parameters = 1
            for dim in shape:
                variable_parameters *= dim.value
            total_parameters += variable_parameters
        print("Total trainable params: %.1fk" % (total_parameters / 1e3))

        Uses TensorFlow commands to count the number of trainable parameters
        in the graph (sum of the multiplied dimensions of each TF variable).
        Then prints the number of parameters.
        
Uses TensorFlow commands to count the number of trainable parameters
in the graph (sum of the multiplied dimensions of each TF variable).
Then prints the number of parameters.
Uses TensorFlow commands to count the number of trainable parameters in the graph ( sum of the multiplied dimensions of each TF variable ) . Then prints the number of parameters .
def _count_trainable_params(self):
        total_parameters = 0
        for variable in tf.trainable_variables():
            shape = variable.get_shape()
            variable_parameters = 1
            for dim in shape:
                variable_parameters *= dim.value
            total_parameters += variable_parameters
        print("Total trainable params: %.1fk" % (total_parameters / 1e3))
def _count_trainable_params ( self ) : total_parameters = 0 for variable in tf . trainable_variables ( ) : shape = variable . get_shape ( ) variable_parameters = 1 for dim in shape : variable_parameters *= dim . value total_parameters += variable_parameters print ( "Total trainable params: %.1fk" % ( total_parameters / 1e3 ) )
Uses TensorFlow commands to count the number of trainable parameters
in the graph (sum of the multiplied dimensions of each TF variable).
Uses TensorFlow commands to count the number of trainable parameters in the graph ( sum of the multiplied dimensions of each TF variable ) .
"""
        Uses TensorFlow commands to count the number of trainable parameters
        in the graph (sum of the multiplied dimensions of each TF variable).
        Then prints the number of parameters.
        """ # print("Variable names:") # print(variable.name)
self