Reader small image

You're reading from  The Deep Learning Architect's Handbook

Product typeBook
Published inDec 2023
PublisherPackt
ISBN-139781803243795
Edition1st Edition
Right arrow
Author (1)
Ee Kin Chin
Ee Kin Chin
author image
Ee Kin Chin

Ee Kin Chin is a Senior Deep Learning Engineer at DataRobot. He holds a Bachelor of Engineering (Honours) in Electronics with a major in Telecommunications. Ee Kin is an expert in the field of Deep Learning, Data Science, Machine Learning, Artificial Intelligence, Supervised Learning, Unsupervised Learning, Python, Keras, Pytorch, and related technologies. He has a proven track record of delivering successful projects in these areas and is dedicated to staying up to date with the latest advancements in the field.
Read more about Ee Kin Chin

Right arrow

Using integrated gradients to aid in understanding predictions

At the time of writing, two packages provide easy-to-use classes and methods to compute integrated gradients, which are the captum and shap libraries. In this tutorial, we will be using the captum library. The captum library supports models from TensorFlow and PyTorch. We will be using PyTorch here. In this tutorial, we will be working on explaining a SoTA transformer model called DeBERTA on the task of text sentiment multiclass classification. Let’s go through the use case step by step:

  1. First, let’s import the necessary libraries and methods:
     from transformers import (
        DebertaForSequenceClassification,
        EvalPrediction,
        DebertaConfig,
        DebertaTokenizer,
        Trainer,
        TrainingArguments,
        IntervalStrategy,
        EarlyStoppingCallback...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
The Deep Learning Architect's Handbook
Published in: Dec 2023Publisher: PacktISBN-13: 9781803243795

Author (1)

author image
Ee Kin Chin

Ee Kin Chin is a Senior Deep Learning Engineer at DataRobot. He holds a Bachelor of Engineering (Honours) in Electronics with a major in Telecommunications. Ee Kin is an expert in the field of Deep Learning, Data Science, Machine Learning, Artificial Intelligence, Supervised Learning, Unsupervised Learning, Python, Keras, Pytorch, and related technologies. He has a proven track record of delivering successful projects in these areas and is dedicated to staying up to date with the latest advancements in the field.
Read more about Ee Kin Chin