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...
Denounce asked 5/1, 2021 at 9:3
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...
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 ...
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...
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...
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?
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...
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.
...
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...
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",...
1
© 2022 - 2024 — McMap. All rights reserved.