import pickle import gzip with gzip.open((PATH / FILENAME).as_posix(), "rb") as f: (([x_train](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor "torch.Tensor"), [y_train](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor "torch.Tensor")), ([x_valid](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor "torch.Tensor"), [y_valid](https://docs.pytorch.org/docs/stable/tensors.html#torch.Tensor "torch.Tensor")), _) = pickle.load(f, encoding="latin-1")