uark-cviu/Micron-BERT

Error:AttributeError: 'tuple' object has no attribute 'cuda'

Opened this issue · 15 comments

How do I fix the following error when I run the code?
image

43zxj commented

How do I fix the following error when I run the code? image

Hello!Have you solved this problem yet?I'm having the same problem.

43zxj commented

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT @.> Cc: Liam_shuchang @.>, Author @.> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try:
get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor)
Someone commented in the 'Pull requests'.

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error.
image

43zxj commented

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了

43zxj commented

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了

这个代码最终得到的是预训练模型抽取的输入图像的特征,无法输出图像。你可以将得到的特征输入分类器或其他模块实现下游目标任务。

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了

这个代码最终得到的是预训练模型抽取的输入图像的特征,无法输出图像。你可以将得到的特征输入分类器或其他模块实现下游目标任务。

明白了,感谢感谢

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了

Not yet,sry

------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@**._> Cc: Liam_shuchang _@.>, Author @.**_> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5)

Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'.

I have modified the code, but there is a new error. image

image

感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了

这个代码最终得到的是预训练模型抽取的输入图像的特征,无法输出图像。你可以将得到的特征输入分类器或其他模块实现下游目标任务。

您好,我看到论文中对微表情分类使用了apex和onset两帧,但是输入只有一张图片。我猜测是用这个模型的encoder提取特征之后,再用类似off-apex论文的方式,使用DMA对两张特征图进行特征提取,再输入到额外的一个网络进行分类。

但是目前似乎给出的权重只有extract_features函数,这个是encoder来提取latent的吧,我要怎么获得dma和后面的分类器呢?请问大佬清楚吗?

43zxj commented

这部分的代码貌似是没有release的,可以联系原作者问一下。

---- Replied Message ---- | From | Ziyue @.> | | Date | 06/27/2023 23:41 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5) | Not yet,sry … ------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT @**.> Cc: Liam_shuchang @.>, Author @._> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5) Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'. I have modified the code, but there is a new error. 感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了 Not yet,sry … ------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@._> Cc: Liam_shuchang @.>, Author @.> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5) Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'. I have modified the code, but there is a new error. 感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了 Not yet,sry … ------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT @**.> Cc: Liam_shuchang @.*>, Author @.> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5) Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'. I have modified the code, but there is a new error. 感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了 这个代码最终得到的是预训练模型抽取的输入图像的特征,无法输出图像。你可以将得到的特征输入分类器或其他模块实现下游目标任务。 您好,我看到论文中对微表情分类使用了apex和onset两帧,但是输入只有一张图片。我猜测是用这个模型的encoder提取特征之后,再用类似off-apex论文的方式,使用DMA对两张特征图进行特征提取,再输入到额外的一个网络进行分类。 但是目前似乎给出的权重只有extract_features函数,这个是encoder来提取latent的吧,我要怎么获得dma和后面的分类器呢?请问大佬清楚吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

嗯嗯,感谢

这部分的代码貌似是没有release的,可以联系原作者问一下。

---- Replied Message ---- | From | Ziyue @.> | | Date | 06/27/2023 23:41 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5) | Not yet,sry … ------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT @**.> Cc: Liam_shuchang @.>, Author @._> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5) Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'. I have modified the code, but there is a new error. 感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了 Not yet,sry … ------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT _@._> Cc: Liam_shuchang @.>, Author @.> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5) Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'. I have modified the code, but there is a new error. 感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了 Not yet,sry … ------------------ Original ------------------ From: 43zxj @.> Date: Tue,Apr 18,2023 0:04 PM To: uark-cviu/Micron-BERT @**.> Cc: Liam_shuchang @.*>, Author @.> Subject: Re: [uark-cviu/Micron-BERT] Error:AttributeError: 'tuple' object has no attribute 'cuda' (Issue #5) Please try: get_model(checkpoint).cuda()-->get_model(checkpoint)[0].cuda() model.extract_features(image) ---> model.extract_features(image_tensor) Someone commented in the 'Pull requests'. I have modified the code, but there is a new error. 感谢你的回复,模型可以运行了。请问大佬怎么得到他的输出图像呢,这边是真小白,打扰了 这个代码最终得到的是预训练模型抽取的输入图像的特征,无法输出图像。你可以将得到的特征输入分类器或其他模块实现下游目标任务。 您好,我看到论文中对微表情分类使用了apex和onset两帧,但是输入只有一张图片。我猜测是用这个模型的encoder提取特征之后,再用类似off-apex论文的方式,使用DMA对两张特征图进行特征提取,再输入到额外的一个网络进行分类。 但是目前似乎给出的权重只有extract_features函数,这个是encoder来提取latent的吧,我要怎么获得dma和后面的分类器呢?请问大佬清楚吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

大佬,有没有下载这个东西
image
原文链接已经过期了

谁能分享一下预训练模型啊,谢谢