Issue
I have made my pandas dataframe X_train
into z
tensor but the output is
user_id=torchtext.data.RawField()
fields=[('user_id',user_id)]
from torchtext.data import Dataset,Example
z=torchtext.data.Dataset(X_train.user_id,fields)
print(len(z))
print(z)
Ouput is:
426018
<torchtext.data.dataset.Dataset object at 0x7feffb6a8f98>
How should I print the actual data in my variable object z?
Solution
Could print(list(torch.utils.data.DataLoader()))
be what you're looking for?
DataLoader(dataset, batch_size=1, shuffle=False, sampler=None,
batch_sampler=None, num_workers=0, collate_fn=None,
pin_memory=False, drop_last=False, timeout=0,
worker_init_fn=None)
Answered By - Ann Zen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.