def _calculate_batch_size(image_count, is_hdf5=False, hdf5_dset_limit=None, image_channels=None, image_height=None, image_width=None):
 if (is_hdf5 and (hdf5_dset_limit is not None)):
  return min(100, image_count, (hdf5_dset_limit / ((image_channels * image_height) * image_width)))
 else:
  return min(100, image_count)

def _calculate_batch_size ( image_count , is_hdf5 = False , hdf5_dset_limit = None , image_channels = None , image_height = None , image_width = None ) : if ( is_hdf5 and ( hdf5_dset_limit is not None ) ) : return min ( 100 , image_count , ( hdf5_dset_limit / ( ( image_channels * image_height ) * image_width ) ) ) else : return min ( 100 , image_count )
calculates an appropriate batch size for creating this database .