小编Jam*_*s B的帖子

TorchText Vocab TypeError: Vocab.__init__() got an unexpected keyword argument 'min_freq'

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, specials=('\<unk\>', '\<BOS\>', '\<EOS\>', '\<PAD\>'))

I am getting a TypeError for the min_freq argument even though I am certain that it is one of the accepted arguments for the function. I am also getting UserWarning Lambda function is not supported for pickle, please use regular python function …

python imdb tokenize conv-neural-network torchtext

5
推荐指数
1
解决办法
4925
查看次数

标签 统计

conv-neural-network ×1

imdb ×1

python ×1

tokenize ×1

torchtext ×1