import torch


def conv1x1(in_planes, out_planes, init='no', cnv_args={
		'bias': True,
		'kernel_size': 1,
	}, std=0.01):
	"""1x1 convolution"""
	cnv = torch.nn.Conv2d(in_planes, out_planes, **cnv_args)

	# init weights ...
	if init == 'no':
		pass
	elif init == 'normal0.01':
		cnv.weight.data.normal_(0., std)
		if cnv.bias is not None:
			cnv.bias.data.fill_(0.)
	else:
		assert False
	
	return cnv