Comments (1)
Hi @heimao63531
可以的。目前我们的实现是基于paddle1.8的静态图,以smooth_grad为例:
import interpretdl as it
def paddle_model(data):
import paddle.fluid as fluid
class_num = 1000
model = ResNet50()
logits = model.net(input=image_input, class_dim=class_num)
probs = fluid.layers.softmax(logits, axis=-1)
return probs
sg = it.SmoothGradInterpreter(paddle_model, "assets/ResNet50_pretrained")
gradients = sg.interpret(img_path, visual=True, save_path='assets/sg_test.jpg')
只需要在paddle_model函数中提供模型的构建,然后在SmoothGradInterpreter里给出模型参数的位置(上例是用的预训练模型"assets/ResNet50_pretrained"
)。
预计这个月底我们将全面支持动态图,到时可以直接在paddle_model里载入训练好的参数,会更加方便。
from interpretdl.
Related Issues (20)
- 运行example_grad_cam_cv.ipynb时报错 HOT 3
- 热力图 HOT 7
- 关于分割模型的可视化 HOT 5
- Infidelity metric not found, probably a new release needed HOT 1
- Interface
- 长宽不相等的图像怎么输入 HOT 5
- Gradient computation changed since paddle2.4
- 分割可视化 HOT 25
- Shapely Value HOT 7
- Grad-CAM可视化分割模型 HOT 2
- GradcamSeg是否支持paddle2.4以上版本? HOT 1
- 请问这里边有没有和自然语言处理相关的 HOT 7
- softmax(): argument 'x' (position 0) must be Tensor, but got list HOT 3
- Tutorial error HOT 3
- Failed to apply gradcam on mobileNetv3-large HOT 6
- 在语义分割中应用GradCAM时,如何对整幅图像进行热力图显示,传入的pixels大小如何确定 HOT 2
- 怎么拿出paddledetection中间的某一层进行可视化 HOT 1
- wrong url HOT 2
- UFuncTypeError: Cannot cast ufunc 'add' output from dtype('O') to dtype('float64') with casting rule 'same_kind' HOT 6
- pip install interpretdl ERROR: Failed building wheel for scikit-learn HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interpretdl.