application_vnd.jupyter.stderr_output_2.png text_plain_output_4.png application_vnd.jupyter.stderr_output_3.png text_plain_output_1.png
!pip install transformers >/dev/null
import torch
from torch.utils.data import Dataset
from torchvision import datasets
from torchvision.transforms import ToTensor
import matplotlib.pyplot as plt
from torch.utils.data import DataLoader
from tqdm import tqdm
device = 'cuda' if torch.cuda.is_available() else 'cpu'
import pandas as pd
import numpy as np
from transformers import BertTokenizer, BertModel
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
bert = BertModel.from_pretrained("bert-base-uncased").to(device)
print("torch.cuda.is_available:",torch.cuda.is_available())