Closed gt-madanb closed 3 years ago
AVIs need to be resized, model expects 112x112 videos.
AVIs need to be resized, model expects 112x112 videos.
when I try to test the video from dynamic dataset, I got the following error
loading weights from D:\stanford_AIMI\weights\r2plus1d_18_32_2_pretrained cuda is not available, cpu weights EXTERNAL_TEST ['0X1A58B506ED05C1D4.avi'] 100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.83s/it]
TypeError Traceback (most recent call last)
in 49 50 test_dataloader = torch.utils.data.DataLoader(ds, batch_size = 1, num_workers = 5, shuffle = True, pin_memory=(device.type == "cuda")) ---> 51 loss, yhat, y = echonet.utils.video.run_epoch(model, test_dataloader, "test", None, device, save_all=True)#, blocks=25) 52 53 with open(output, "w") as g: ~\dynamic-master\echonet\utils\video.py in run_epoch(model, dataloader, train, optim, device, save_all, block_size) 312 y = [] 313 --> 314 with torch.set_grad_enabled(train): 315 with tqdm.tqdm(total=len(dataloader)) as pbar: 316 for (X, outcome) in dataloader: ~\anaconda3\lib\site-packages\torch\autograd\grad_mode.py in __init__(self, mode) 200 def __init__(self, mode: bool) -> None: 201 self.prev = torch.is_grad_enabled() --> 202 torch._C._set_grad_enabled(mode) 203 204 def __enter__(self) -> None: TypeError: enabled must be a bool (got str)
I am trying to run on an Initialization notebook with external test videos which is already in avi format.