Comments (8)
本人萌新,同样遇到了'tuple' object has no attribute 'cpu'问题,想请教下怎么解决的
from dan.
Write a wrapper around the model such that only the prediction of the model is returned:
class ModelInferenceGradCam(torch.nn.Module):
def __init__(self, model):
super().__init__()
self.model = model
def forward(self, x):
return self.model(x)[0]
Use this wrapper for GradCam instead of the raw model.
from dan.
本人萌新,同样遇到了'tuple' object has no attribute 'cpu'问题,想请教下怎么解决的
请问您解决了吗,我也有这个问题
from dan.
from dan.
嗯,使用DAN可视化的时候把网络的输出改为单输出即可
…
------------------ 原始邮件 ------------------ 发件人: "yaoing/DAN" @.>; 发送时间: 2023年5月28日(星期天) 中午1:07 @.>; @.@.>; 主题: Re: [yaoing/DAN] Question in demo.py and run_grad_cam.py (Issue #27) 本人萌新,同样遇到了'tuple' object has no attribute 'cpu'问题,想请教下怎么解决的 请问您解决了吗,我也有这个问题 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
您好,我是萌新不好意思打扰了,
单输出是指只保留out,x和heads中的一个吧,保留哪个呢,谢谢
from dan.
嗯,使用DAN可视化的时候把网络的输出改为单输出即可
…
------------------ 原始邮件 ------------------ 发件人: "yaoing/DAN" @.>; 发送时间: 2023年5月28日(星期天) 中午1:07 @.>; @.@.>; 主题: Re: [yaoing/DAN] Question in demo.py and run_grad_cam.py (Issue #27) 本人萌新,同样遇到了'tuple' object has no attribute 'cpu'问题,想请教下怎么解决的 请问您解决了吗,我也有这个问题 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
可以提供一下您修改好的版本吗,我的邮箱是:[email protected]
十分感谢您!
from dan.
from dan.
印象中是保留out。因为grad-cam原理是要通过单个输出获得反向传播的梯度值,希望可以帮到你。
…
------------------ 原始邮件 ------------------ 发件人: "yaoing/DAN" @.>; 发送时间: 2023年5月28日(星期天) 下午2:59 @.>; @.@.>; 主题: Re: [yaoing/DAN] Question in demo.py and run_grad_cam.py (Issue #27) 嗯,使用DAN可视化的时候把网络的输出改为单输出即可 … ------------------ 原始邮件 ------------------ 发件人: "yaoing/DAN" @.>; 发送时间: 2023年5月28日(星期天) 中午1:07 @.>; @.@.>; 主题: Re: [yaoing/DAN] Question in demo.py and run_grad_cam.py (Issue #27) 本人萌新,同样遇到了'tuple' object has no attribute 'cpu'问题,想请教下怎么解决的 请问您解决了吗,我也有这个问题 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> 您好,我是萌新不好意思打扰了, 单输出是指只保留out,x和heads中的一个吧,保留哪个呢,谢谢 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>
好的,感谢你!
from dan.
Related Issues (20)
- Wrong average accuracy report. HOT 2
- About pre-trained model of MSCeleb HOT 2
- Why Batchnorm at the final network output? HOT 3
- Trained cluster centers HOT 3
- A mistake in rafdb.py HOT 2
- recommendation for program robustness HOT 1
- How to get 82.75% HOT 4
- Question about conversion of original Affectnet dataset HOT 2
- Some questions about the dataset HOT 1
- Re-produce the result. HOT 5
- Grad Cam visualization HOT 4
- Question in demo.py HOT 2
- MS-celeb预训练的下载地址无效
- feature vector
- 请问一下当运行rafdb.py时,在Affinity Loss中默认的num_classes为8类,可对于RAF_DB数据集而言只有7类,请问一下这8类如何解释呢 HOT 4
- GRADCAM++需要替换哪些变量 HOT 3
- 关于Grad_Cam
- Is this method also applicable for fer2013 data set? Why did the author not verify it on the most common fer2013 data set HOT 1
- 求问AffectNet数据集的预处理方法 HOT 2
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 dan.