Using BERT with Scikit Learn to do Text classification | python

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I'm getting this error:
NameError Traceback (most recent call last)
in <module>()
1 X = df[0]
2 Y = df[1]
----> 3 encoder = LabelEncoder()
4 Y = encoder.fit_transform(Y)
5 x_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.3)

NameError: name 'LabelEncoder' is not defined

I have copy pasted the code so it's all the same. Any idea as to why?

aanwar
Автор

ERROR :
Expected tensor for argument #1 'indices' to have scalar type Long; but got torch.IntTensor instead (while checking arguments for embedding)

kishorekarunakarapoojary
Автор

Hi, I take this error:

RuntimeError: [enforce fail at CPUAllocator.cpp:67] . DefaultCPUAllocator: can't allocate memory: you tried to allocate 1634586550272 bytes. Error code 12 (Cannot allocate memory)

How can I solve?

You are great

pasqualerestaino
join shbcf.ru