cerebras.modelzoo.common.pytorch_utils.to_tensor#

cerebras.modelzoo.common.pytorch_utils.to_tensor(value, device=None)[source]#

If the provided value is a Python int or float, it converts them into PyTorch Tensors of type int32 and float32 respectively. Otherwise, it just returns the value.