File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 89
89
90
90
# Get cpu or gpu device for training.
91
91
device = "cuda" if torch .cuda .is_available () else "cpu"
92
- print ("Using {} device" . format ( device ) )
92
+ print (f "Using { device } device" )
93
93
94
94
# Define model
95
95
class NeuralNetwork (nn .Module ):
Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
- r """
2
+ """
3
3
PyTorch: Defining New autograd Functions
4
4
----------------------------------------
5
5
Original file line number Diff line number Diff line change 14
14
# attribution algorithms such as \ ``Guided GradCam``\ and
15
15
# \ ``Integrated Gradients``\ in a unified way.
16
16
#
17
- # In this recipe you will learn how to use Captum to: \* attribute the
18
- # predictions of an image classifier to their corresponding image
19
- # features. \* visualize the attribution results.
17
+ # In this recipe you will learn how to use Captum to:
18
+ #
19
+ # - Attribute the predictions of an image classifier to their corresponding image features.
20
+ # - Visualize the attribution results.
20
21
#
21
22
22
23
You can’t perform that action at this time.
0 commit comments