Learn without Forgetting to minimize the catastrophic forgetting

i have my ground_truth which is in json format contains information from image like address, name , pincode etc and their respective values , i want to extract the labels and convert them into the torch.tensor how to do that?