Originally created by @wz1114841863 on GitHub (Jan 13, 2026).
layers.ipynb specifies requires_grad=True when initializing the Tensor, but this initialization parameter is not specified when constructing the Tensor class in tensor.ipynb. Therefore, an error occurs during execution. Is this behavior as expected?
Originally created by @wz1114841863 on GitHub (Jan 13, 2026).
layers.ipynb specifies requires_grad=True when initializing the Tensor, but this initialization parameter is not specified when constructing the Tensor class in tensor.ipynb. Therefore, an error occurs during execution. Is this behavior as expected?
<img width="959" height="729" alt="Image" src="https://github.com/user-attachments/assets/392e705c-a70d-43dd-ae88-66b1d65aaa17" />
I manually modified the Tensor definition in tinytorch/core/tensor.py to ensure the tests in 03-layers run correctly in Jupyter. However, when submitting with tito module complete 03, I encountered the following error. I did not modify any code in Jupyter—only read and understood it—so I'm unsure what caused this issue, especially since all unit tests passed.
@wz1114841863 commented on GitHub (Jan 13, 2026):
I manually modified the Tensor definition in `tinytorch/core/tensor.py` to ensure the tests in `03-layers` run correctly in Jupyter. However, when submitting with `tito module complete 03`, I encountered the following error. I did not modify any code in Jupyter—only read and understood it—so I'm unsure what caused this issue, especially since all unit tests passed.
<img width="867" height="1039" alt="Image" src="https://github.com/user-attachments/assets/ae6e432c-c718-401c-822c-e993db0d6364" />
Module 03 was incorrectly passing requires_grad=True to the Tensor constructor, but requires_grad isn't introduced until Module 06 via monkey-patching. I removed the premature requires_grad=True from the Linear layer so students can complete Module 03 without needing autograd.
If you pull the latest dev branch, this should work now. Thanks for reporting!
@profvjreddi commented on GitHub (Jan 13, 2026):
This is the same issue we just fixed in PR #1101.
Module 03 was incorrectly passing requires_grad=True to the Tensor constructor, but requires_grad isn't introduced until Module 06 via monkey-patching. I removed the premature requires_grad=True from the Linear layer so students can complete Module 03 without needing autograd.
I just fixed in https://github.com/harvard-edge/cs249r_book/commit/a36340690. I can't believe this slipped through my tests 😮💨
If you pull the latest `dev` branch, this should work now. Thanks for reporting!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @wz1114841863 on GitHub (Jan 13, 2026).
layers.ipynb specifies requires_grad=True when initializing the Tensor, but this initialization parameter is not specified when constructing the Tensor class in tensor.ipynb. Therefore, an error occurs during execution. Is this behavior as expected?
@wz1114841863 commented on GitHub (Jan 13, 2026):
I manually modified the Tensor definition in

tinytorch/core/tensor.pyto ensure the tests in03-layersrun correctly in Jupyter. However, when submitting withtito module complete 03, I encountered the following error. I did not modify any code in Jupyter—only read and understood it—so I'm unsure what caused this issue, especially since all unit tests passed.@profvjreddi commented on GitHub (Jan 13, 2026):
This is the same issue we just fixed in PR #1101.
Module 03 was incorrectly passing requires_grad=True to the Tensor constructor, but requires_grad isn't introduced until Module 06 via monkey-patching. I removed the premature requires_grad=True from the Linear layer so students can complete Module 03 without needing autograd.
I just fixed in https://github.com/harvard-edge/cs249r_book/commit/a36340690. I can't believe this slipped through my tests 😮💨
If you pull the latest
devbranch, this should work now. Thanks for reporting!@profvjreddi commented on GitHub (Jan 23, 2026):
v0.1.4 is now released with this fix! See #1112 for update instructions.