Pass a minibatch through the network and generate images, depth maps, and losses.
(self, inputs, rank)
| 189 | ) |
| 190 | |
| 191 | def process_batch(self, inputs, rank): |
| 192 | """ |
| 193 | Pass a minibatch through the network and generate images, depth maps, and losses. |
| 194 | """ |
| 195 | for key, ipt in inputs.items(): |
| 196 | if key not in _NO_DEVICE_KEYS: |
| 197 | if 'context' in key: |
| 198 | inputs[key] = [ipt[k].float().to(rank) for k in range(len(inputs[key]))] |
| 199 | else: |
| 200 | inputs[key] = ipt.float().to(rank) |
| 201 | |
| 202 | outputs = self.estimate_vfdepth(inputs) |
| 203 | losses = self.compute_losses(inputs, outputs) |
| 204 | return outputs, losses |
| 205 | |
| 206 | def estimate_vfdepth(self, inputs): |
| 207 | """ |
no test coverage detected