import torch


def convert_to_one_hot(index, action_size):
	"""
	Converts a given input to a one hot vector

	Parameters
	----------
	index: int
		index of the one
	size: int
		size of tensor

	Returns
	-------
	torch.tensor
		output tensor one hot
	"""
	one_hot_action = torch.zeros((1, action_size))
	one_hot_action[0][index] = 1
	return one_hot_action