def METHOD_NAME(self, data, layer_name, layout, precision, template=None):
    if layout is not None:
        data = np.transpose(data, layout)
    tensor = self._torch.from_numpy(data.astype(np.float32 if not precision else precision))
    tensor = tensor.to(self.device)
    return tensor