mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-08 18:01:20 -05:00
DummyModel.parameters() was returning [np.array([1.0])], a raw numpy array. Trainer.__init__ iterates model.parameters() and checks param.requires_grad, which crashes with AttributeError on numpy arrays. Fix: give DummyModel a proper Tensor parameter with requires_grad=True, consistent with how every other test stub in this file constructs params.