Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pytorch/tutorials
/ __len__
Method
__len__
beginner_source/data_loading_tutorial.py:135–136 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
133
self.transform = transform
134
135
def
__len__(self):
136
return
len(self.landmarks_frame)
137
138
def
__getitem__(self, idx):
139
if
torch.is_tensor(idx):
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected