Skip to content

What does -> torch.Tensor mean? #198

Answered by fivefishstudios
mostfa00 asked this question in Q&A
Discussion options

You must be logged in to vote

They're called function typehints. i.e. the output/return value of that function forward() is a type of 'torch.Tensor'

I think it's only used for documentation and code hints and not actually enforced by Python.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by mrdbourke
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants