def ComputeConvOutputShape(in_shape, t_stride, f_stride, outc=None, padding='SAME'):
    "Computes output shape for convolution and pooling layers.\n\n  If `in_shape` is a dynamic shape, the output will be Tensors, while if\n  `in_shape` is a list of ints then the output will also be a list of ints.\n\n  Args:\n    in_shape: A length 4 Tensor or list representing the input shape.\n    t_stride: The stride along the time dimension.\n    f_stride: The stride along the frequency dimension.\n    outc: The expected output channel. If None, will use the input channel.\n    padding: 'SAME' or 'VALID'.\n\n  Returns:\n    The expected output shape.\n  "
    n = in_shape[0]
    t = in_shape[1]
    f = in_shape[2]
    c = in_shape[3]
    assert ((f is not None) and (c is not None))
    if (padding == 'VALID'):
        if t:
            t -= (t_stride - 1)
        f -= (f_stride - 1)
    ot = t
    if (ot is not None):
        ot = (((ot + t_stride) - 1) // t_stride)
    of = (((f + f_stride) - 1) // f_stride)
    if (outc is None):
        outc = c
    return [n, ot, of, outc]
Computes output shape for convolution and pooling layers.

If `in_shape` is a dynamic shape, the output will be Tensors, while if
`in_shape` is a list of ints then the output will also be a list of ints.

Args:
  in_shape: A length 4 Tensor or list representing the input shape.
  t_stride: The stride along the time dimension.
  f_stride: The stride along the frequency dimension.
  outc: The expected output channel. If None, will use the input channel.
  padding: 'SAME' or 'VALID'.

Returns:
  The expected output shape.
def ComputeConvOutputShape(in_shape, t_stride, f_stride, outc=None, padding='SAME'):
    "Computes output shape for convolution and pooling layers.\n\n  If `in_shape` is a dynamic shape, the output will be Tensors, while if\n  `in_shape` is a list of ints then the output will also be a list of ints.\n\n  Args:\n    in_shape: A length 4 Tensor or list representing the input shape.\n    t_stride: The stride along the time dimension.\n    f_stride: The stride along the frequency dimension.\n    outc: The expected output channel. If None, will use the input channel.\n    padding: 'SAME' or 'VALID'.\n\n  Returns:\n    The expected output shape.\n  "
    n = in_shape[0]
    t = in_shape[1]
    f = in_shape[2]
    c = in_shape[3]
    assert ((f is not None) and (c is not None))
    if (padding == 'VALID'):
        if t:
            t -= (t_stride - 1)
        f -= (f_stride - 1)
    ot = t
    if (ot is not None):
        ot = (((ot + t_stride) - 1) // t_stride)
    of = (((f + f_stride) - 1) // f_stride)
    if (outc is None):
        outc = c
    return [n, ot, of, outc]