torchtext Questions

3

I'm trying to prune my model in PyTorch with torch.nn.utils.prune, which provides 2 tensors, one is the original weight and the other is a mask contain 0s and 1s that help us close certain conn...
Sianna asked 11/6, 2020 at 14:27

5

I am trying to run this tutorial in colab. However, when I try to import a bunch of modules: import io import torch from torchtext.utils import download_from_url from torchtext.data.utils import ge...

3

Solved

I am working on a CNN Sentiment analysis machine learning model which uses the IMDb dataset provided by the Torchtext library. On one of my lines of code vocab = Vocab(counter, min_freq = 1, specia...
Hemia asked 28/3, 2022 at 19:41

1

as i know, from torchtext 0.9.0, torchtext.data and torchtext.dataset are moved to torchtext.legacy but my 0.12.0 torchtext can't import torchtext.legacy while it can import torchtext.data I tried...
Origin asked 16/3, 2022 at 7:58

4

Solved

Looks like the previous paradigm of declaring Fields, Examples and using BucketIterator is deprecated and will move to legacy in 0.8. However, I don't seem to be able to find an example of the new ...
Spec asked 22/8, 2020 at 18:37

2

I have a dataframe, which has two columns (review and sentiment). I am using pytorch and torchtext library for preprocessing data. Is it possible to use dataframe as source to read data from, in to...
Juliannejuliano asked 2/10, 2018 at 4:33

1

Solved

I have 64 bit windows 10 OS I have installed python 3.6.8 I have installed torch and torchtext using pip. torch version is 1.2.0 I am trying to load AG_NEWS dataset using below code: import torch...
Toowoomba asked 18/9, 2019 at 9:0

5

Solved

The torchtext 0.4.0 library exists (can be downloaded thru pip), but conda install torchtext=0.4.0 will not work. How can I download torchtext to a anaconda environment?
Chaumont asked 31/7, 2019 at 8:33

1

Solved

It's not a new question, references I found without any solution working for me first and second. I'm a newbie to PyTorch, facing AttributeError: 'Field' object has no attribute 'vocab' while creat...
Greysun asked 22/5, 2019 at 7:16

0

Returned iterator of BucketIterator is giving an error. train_iterator = data.BucketIterator.splits( train_data, batch_size=BATCH_SIZE, device=device ) Value of train_data also looks good. ...
Probability asked 14/11, 2018 at 12:21

1

Solved

torchtext.data.TabularDataset can be created from a TSV/JSON/CSV file and then it can be used for building the vocabulary from Glove, FastText or any other embeddings. But my requirement is to crea...
Claiborn asked 29/10, 2018 at 13:31

1

Solved

When I try to look into a batch, by printing the next iteration of the BucketIterator object, the AttributeError is thrown. tv_datafields=[("Tweet",TEXT), ("Anger",LABEL), ("Fear",LABEL), ("Joy",...
Dayna asked 8/7, 2018 at 12:8
1

© 2022 - 2024 — McMap. All rights reserved.