mirror of
https://github.com/wassname/ray.git
synced 2026-08-12 12:20:11 +08:00
Bug fix in the contextual bandit's linear_regression.py model. (#8815)
This commit is contained in:
@@ -34,7 +34,7 @@ class OnlineLinearRegression(nn.Module):
|
||||
def partial_fit(self, x, y):
|
||||
# TODO: Handle batch of data rather than individual points
|
||||
self._check_inputs(x, y)
|
||||
x = x.squeeze()
|
||||
x = x.squeeze(0)
|
||||
y = y.item()
|
||||
self.time += 1
|
||||
self.delta_f += y * x
|
||||
|
||||
Reference in New Issue
Block a user