MCPcopy Create free account
hub / github.com/Vincentzyx/Douzero_Resnet / predict

Function predict

BidModel.py:66–72  ·  view source on GitHub ↗
(cards)

Source from the content-addressed store, hash-verified

64 net.load_state_dict(torch.load('./bid_weights.pkl', map_location=torch.device("cpu")))
65
66def predict(cards):
67 input = RealToOnehot(cards)
68 if UseGPU:
69 input = input.to(device)
70 input = torch.flatten(input)
71 win_rate = net(input)
72 return win_rate[0].item() * 100
73
74def predict_env(cards):
75 input = EnvToOnehot(cards)

Callers

nothing calls this directly

Calls 1

RealToOnehotFunction · 0.85

Tested by

no test coverage detected