liupei101 / DSCA

[ESWA 2023] Implementation of DSCA: A Dual-stream Network with Cross-attention on Whole-Slide Image Pyramids for Cancer Prognosis
22 stars 5 forks source link

关于AttributeError: 'Lookahead' object has no attribute '_optimizer_step_pre_hooks' #5

Closed ljhOfGithub closed 1 year ago

ljhOfGithub commented 1 year ago

您好!您借鉴官方代码 https://github.com/huggingface/pytorch-image-models/blob/main/timm/optim/lookahead.py 的地方,在/optim/lookahead.py的文件中遗漏了: self._optimizer_step_pre_hooks: Dict[int, Callable] = OrderedDict() self._optimizer_step_post_hooks: Dict[int, Callable] = OrderedDict() 导致出现如题的bug