Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练训练PostNet模型时报AttributeError: 'PostnetAdvSyncTask' object has no attribute '_lazy_val_dataloader' #253

Open
Liuling608 opened this issue Dec 27, 2023 · 1 comment

Comments

@Liuling608
Copy link

Traceback (most recent call last):
File "Z:\GeneFace-main\utils\commons\dataset_utils.py", line 158, in _get_data_loader
value = getattr(self, attr_name)
File "C:\ProgramData\Anaconda3\envs\geneface\lib\site-packages\torch\nn\modules\module.py", line 1185, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'PostnetAdvSyncTask' object has no attribute '_lazy_val_dataloader'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "Z:\GeneFace-main\tasks\run.py", line 19, in
run_task()
File "Z:\GeneFace-main\tasks\run.py", line 14, in run_task
task_cls.start()
File "Z:\GeneFace-main\utils\commons\base_task.py", line 251, in start
trainer.fit(cls)
File "Z:\GeneFace-main\utils\commons\trainer.py", line 123, in fit
self.run_single_process(self.task)
File "Z:\GeneFace-main\utils\commons\trainer.py", line 187, in run_single_process
self.train()
File "Z:\GeneFace-main\utils\commons\trainer.py", line 262, in train
self.evaluate(self.task, False, 'Sanity Val', max_batches=self.num_sanity_val_steps)
File "Z:\GeneFace-main\utils\commons\trainer.py", line 220, in evaluate
dataloader = task_ref.test_dataloader() if test else task_ref.val_dataloader()
File "Z:\GeneFace-main\utils\commons\dataset_utils.py", line 161, in _get_data_loader
value = fn(self) # Lazy evaluation, done only once.
File "Z:\GeneFace-main\tasks\postnet\lm3d_postnet_adv_sync.py", line 89, in val_dataloader
val_dataset = self.dataset_cls(prefix='val')
File "Z:\GeneFace-main\tasks\postnet\dataset_utils.py", line 15, in init
person_ds_dict = np.load(binary_file_name, allow_pickle=True).tolist()
File "C:\ProgramData\Anaconda3\envs\geneface\lib\site-packages\numpy\lib\npyio.py", line 405, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'data/binary/videos\May\trainval_dataset.npy'

在运行训练模型时报以上错误,请问如何解决?

@Westbrook077
Copy link

您好,我也是报这个错,请问解决了吗

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

No branches or pull requests

2 participants