Skip to content

Conversation

@mrinalchaturvedi27
Copy link

@mrinalchaturvedi27 mrinalchaturvedi27 commented Jan 4, 2026

  • Added requires_grad parameter to Tensor.__init__ in tinytorch/src/01_tensor/01_tensor.py
  • Fixes TypeError caused by Tensor(weight_data, requires_grad=True) in Linear layer
  • Ensures compatibility with autograd flag usage across activation and layer modules
  • Tested locally: Linear layer unit test passes after this change

@profvjreddi
Copy link
Contributor

Thank you for issuing this PR. I'll take a look at it later today and merge it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants