MCPcopy Create free account
hub / github.com/MarcCoru/locationencoder / common_step

Method common_step

locationencoder/imageencoder.py:24–27  ·  view source on GitHub ↗
(self, batch, batch_idx)

Source from the content-addressed store, hash-verified

22 self.save_hyperparameters()
23
24 def common_step(self, batch, batch_idx):
25 images, _, labels, _ = batch
26 output = self.model(images)
27 return self.criterion(output, labels), output
28
29 def forward(self, images):
30 return self.model(images)

Callers 3

training_stepMethod · 0.95
validation_stepMethod · 0.95
test_stepMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_stepMethod · 0.76