(self)
return (flush_chunk_size, support_chunk_size, query_chunk_size)
Computes the maximal sizes for the flush, support, and query chunks.

    Sequences of dataset IDs are padded with placeholder IDs to make sure they
    can be batched into episodes of equal sizes.

    The "flush" part of the sequence has a size that is upper-bounded by the
    size of the "support" and "query" parts.

    If variable, the size of the "support" part is in the worst case

        max_support_set_size,

    and the size of the "query" part is in the worst case

        max_ways_upper_bound * max_num_query.

    Returns:
      The sizes of the flush, support, and query chunks.
Computes the maximal sizes for the flush, support, and query chunks.
Computes the maximal sizes for the flush support and query chunks .
def compute_chunk_sizes(self):
    """Computes the maximal sizes for the flush, support, and query chunks.

    Sequences of dataset IDs are padded with placeholder IDs to make sure they
    can be batched into episodes of equal sizes.

    The "flush" part of the sequence has a size that is upper-bounded by the
    size of the "support" and "query" parts.

    If variable, the size of the "support" part is in the worst case

        max_support_set_size,

    and the size of the "query" part is in the worst case

        max_ways_upper_bound * max_num_query.

    Returns:
      The sizes of the flush, support, and query chunks.
    """
    if self.num_ways is None:
      max_num_ways = self.max_ways_upper_bound
    else:
      max_num_ways = self.num_ways

    if self.num_support is None:
      support_chunk_size = self.max_support_set_size
    elif isinstance(self.num_support, int):
      support_chunk_size = max_num_ways * self.num_support
    else:
      largest_num_support_per_class = self.num_support[1]
      support_chunk_size = max_num_ways * largest_num_support_per_class

    if self.num_query is None:
      max_num_query = self.max_num_query
    else:
      max_num_query = self.num_query
    query_chunk_size = max_num_ways * max_num_query

    flush_chunk_size = support_chunk_size + query_chunk_size
    return (flush_chunk_size, support_chunk_size, query_chunk_size)
def compute_chunk_sizes ( self ) : if self . num_ways is None : max_num_ways = self . max_ways_upper_bound else : max_num_ways = self . num_ways if self . num_support is None : support_chunk_size = self . max_support_set_size elif isinstance ( self . num_support , int ) : support_chunk_size = max_num_ways * self . num_support else : largest_num_support_per_class = self . num_support [ 1 ] support_chunk_size = max_num_ways * largest_num_support_per_class if self . num_query is None : max_num_query = self . max_num_query else : max_num_query = self . num_query query_chunk_size = max_num_ways * max_num_query flush_chunk_size = support_chunk_size + query_chunk_size return ( flush_chunk_size , support_chunk_size , query_chunk_size )