beichenzbc / Long-CLIP

[ECCV 2024] official code for "Long-CLIP: Unlocking the Long-Text Capability of CLIP"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[rank2]: AttributeError: module 'torch.distributed' has no attribute 'nn'

zimenglan-sysu-512 opened this issue · comments

when run the train.py, encounters the problem: [rank2]: AttributeError: module 'torch.distributed' has no attribute 'nn'.

it can be solved by adding this line: import torch.distributed.nn as nn_dist in model/model_longclip.py file.

by the way, @beichenzbc can u share the training log file, i want to see whether can reproduce the result.
thanks