mihirp1998/Diffusion-TTA

About Getting Started

Closed this issue · 4 comments

Hi, thanks for your good work and sharing the code. I'm trying to do some experiments based on your model but have met some problems. I carefully followed your training environment, and when I used the command to run the code, I got this error:
error
Could you give me some advice about how to fix the problem?

Hi, thanks for your interest in our code. What's the command you were using?

Also, did you use this DiT repo instead of the official one? The official DiT repo does not support conditioning with the predicted classification.

Thanks for your quick reply. I just followed your guide to clone your DiT branch from the official repo. The command I use is ConvNext-Large/DiT. I also tested other commands like ConvNext-Tiny/DiT (single-sample TTA on ImageNet-R or -C-A), and it faced the same error.

Hi, the input tensor shape doesn't look correct to me. The class_text_embeddings variable here should be a tensor of shape (1, 1000, 1152) and the probs variable here should be a tensor of shape (1, 1000, 1). To guide the classifier, we weighted average class_text_embeddings with the classification probs, resulting in the variable context of shape (1, 1152).

Did you modify the code? If so, could you show the change of codes? Also, could you print out the tensor shape in each line of this code block?

Thanks for your reply! Based on your feedback, I fixed the error. It is really a small mistake when I change the codes and forget to delete one of lines. Thus, the wrong code changes the tensor shape.