mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-11-03 05:33:57 +08:00
Remove redundant tensor assignment in model runner.
The `assign` operation was unnecessary as new tensors are realized for updated inputs. This simplifies the code and avoids redundant updates, improving clarity and maintainability.
This commit is contained in:
@@ -70,8 +70,6 @@ class TinyGradRunner(ModelRunner):
|
||||
for k, v in numpy_inputs.items():
|
||||
if k not in self.tensor_inputs:
|
||||
self.tensor_inputs[k] = Tensor(v, device='NPY').realize()
|
||||
else:
|
||||
self.tensor_inputs[k].assign(v)
|
||||
|
||||
return self.tensor_inputs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user