def center_crop_images(images, crop_resolution: int):
    """
    Crops the center of the images
    Args:
        images: shape: (B, H, W, 3), H should be equal to W
        crop_resolution: target resolution for the crop

    Returns:
        cropped images which has the shape: (B, crop_resolution, crop_resolution, 3)
    """

    # crop_resolution = tf.cast(crop_resolution, tf.float32)
    half_of_crop_resolution = crop_resolution / 2
    image_height = images.shape[1]
    image_center = image_height / 2

    from_ = int(image_center - half_of_crop_resolution)
    to_ = int(image_center + half_of_crop_resolution)

    return images[:, from_:to_, from_:to_, :]