from typing import Union
from typing import Tuple
import torch


def conv1x1(in_planes: int, out_planes: int, stride: Union[int, Tuple[int, int]] = 1):
    """
    CREDITS: https://github.com/pytorch/vision
    1x1 convolution
    """
    return torch.nn.Conv2d(
        in_channels=in_planes,
        out_channels=out_planes,
        kernel_size=1,
        stride=stride,
        bias=False
    )