MCPcopy Create free account
hub / github.com/42dot/VFDepth / process_batch

Method process_batch

models/vfdepth.py:191–204  ·  view source on GitHub ↗

Pass a minibatch through the network and generate images, depth maps, and losses.

(self, inputs, rank)

Source from the content-addressed store, hash-verified

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 """

Callers 3

trainMethod · 0.80
validateMethod · 0.80
evaluateMethod · 0.80

Calls 2

estimate_vfdepthMethod · 0.95
compute_lossesMethod · 0.95

Tested by

no test coverage detected