Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoencoders, Object Detection with YOLO v5, Build your first Neural Network, Time Series forecasting for Coronavirus daily cases, Sentiment Analysis with BER
Change this line -> bert_model = BertModel.from_pretrained(PRE_TRAINED_MODEL_NAME) to
bert_model = BertModel.from_pretrained(PRE_TRAINED_MODEL_NAME, return_dict=False)
as a result the dict will not return str rather will return tensor.
It will help you with other parts of code as well.
Change this line -> bert_model = BertModel.from_pretrained(PRE_TRAINED_MODEL_NAME) to bert_model = BertModel.from_pretrained(PRE_TRAINED_MODEL_NAME, return_dict=False)
as a result the dict will not return str rather will return tensor.
It will help you with other parts of code as well.