MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / run_eval

Function run_eval

scripts/train_predictor.py:565–572  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

563 return hits, total
564
565 def run_eval():
566 model.eval()
567 with torch.no_grad():
568 chunks = []
569 for i in range(0, len(X_test), 512):
570 chunks.append(model(X_test[i:i+512].to(device),
571 L_test[i:i+512].to(device)).cpu())
572 return torch.cat(chunks, dim=0).numpy()
573
574 for epoch in range(epochs):
575 model.train()

Callers 1

train_and_evaluateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected