parameters: (is_valid, is_same, is_pad, input_length, filter_size, stride_size, dilation_size, padding)
return_statement: return length
docstring: Calculate the width and height of output.
docstring_summary: Calculate the width and height of output.
docstring_tokens: Calculate the width and height of output .
function: def _deconv_output_length(is_valid, is_same, is_pad, input_length, filter_size, stride_size, dilation_size, padding):
      """Calculate the width and height of output."""
      length = 0
      filter_size = filter_size + (filter_size - 1) * (dilation_size - 1)
      if is_valid:
          if filter_size - stride_size > 0:
              length = input_length * stride_size + filter_size - stride_size
          else:
              length = input_length * stride_size
      elif is_same:
          length = input_length * stride_size
      elif is_pad:
          length = input_length * stride_size - padding + filter_size - stride_size
  
      return length
function_tokens: def _deconv_output_length ( is_valid , is_same , is_pad , input_length , filter_size , stride_size , dilation_size , padding ) : length = 0 filter_size = filter_size + ( filter_size - 1 ) * ( dilation_size - 1 ) if is_valid : if filter_size - stride_size > 0 : length = input_length * stride_size + filter_size - stride_size else : length = input_length * stride_size elif is_same : length = input_length * stride_size elif is_pad : length = input_length * stride_size - padding + filter_size - stride_size return length