ZhaoZhibin / UDTL

Source codes for the paper "Applications of Unsupervised Deep Transfer Learning to Intelligent Fault Diagnosis: A Survey and Comparative Study" published in TIM
MIT License
400 stars 103 forks source link

iter_target.next() #15

Open Hide927 opened 1 year ago

Hide927 commented 1 year ago

Problem:

When using Python 3.9.0, the following error will occur:

AttributeError: '_SingleProcessDataLoaderIter' object has no attribute 'next'

Solution:

change line 260 target_inputs, _ = iter_target.next() in utils/train_utils_combines.py to target_inputs, _ = next(iter_target)

Thanks for your effort! This code helped me a lot : )