(self, args)
| 7 | |
| 8 | class Flow_estimator(): |
| 9 | def __init__(self, args): |
| 10 | |
| 11 | self.args = args |
| 12 | if not os.path.exists(args.model): |
| 13 | raise FileExistsError(args.model) |
| 14 | # self.network = torch.nn.DataParallel(RAFT(args)).cuda() |
| 15 | # self.network.load_state_dict(torch.load(args.model)["model"], False) |
| 16 | |
| 17 | self.network = RAFT(args).cuda() |
| 18 | self.network.load_state_dict(torch.load(args.model), False) |
| 19 | |
| 20 | #for parameters in self.network.parameters(): |
| 21 | # print(parameters) |
| 22 | |
| 23 | def estimate(self, im1, im2): |
| 24 | ''' |