Skip to content

Conversation

@XingweiDeng
Copy link

No description provided.

@paddle-bot
Copy link

paddle-bot bot commented Dec 2, 2025

Thanks for your contribution!

return out3


class UVDocnet(PretrainedModel):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

按照我们的命名风格,是否应该是UVDocNet或者直接UVDoc之类的?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


return [out.cpu().numpy()]

def get_transpose_weight_keys(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果没有需要翻转的key,就不用重写这个方法

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

model_state_dict = self.state_dict(*args, **kwargs)

hf_state_dict = {}
for old_key, value in model_state_dict.items():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段逻辑如果特别常用的话,可以评估一下是否抽出来放在一个公共的地方,各个模型都可以调用。比如考虑封装成函数或者mixin的形式。

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done



class HFStateDictMixin:
class BNHFStateDictMixin:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议写BatchNorm吧,更清晰一些

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Bobholamovic Bobholamovic merged commit 6963c8e into PaddlePaddle:develop Dec 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants