Closed wwweeeeiii closed 9 months ago
Hello,
I think the most likely explanation for the error is the way the save paths are defined. Based on your operating system you might want to modify these lines of code: ct = datetime.now()
model_type = "DuckNet"
progresspath = 'ProgressFull/' + dataset_type + '_progress_csv_' + model_type + '_filters_' + str(filters) + '\' + str(ct) + '.csv' progressfullpath = 'ProgressFull/' + dataset_type + '_progress_' + model_type + '_filters_' + str(filters) + '\' + str(ct) + '.txt' plotpath = 'ProgressFull/' + dataset_type + '_progress_plot_' + model_type + '_filters_' + str(filters) + '\' + str(ct) + '.png' modelpath = 'ModelSaveTensorFlow/' + dataset_type + '/' + model_type + '_filters_' + str(filters) + '\' + str(ct)
I suggest that you try experimenting with the following:
First, try replacing the character ":" from the datetime with a "_", as in some cases this may be problematic. I suggest the following modification: progresspath = './ProgressFull/' + dataset_type + '_progress_csv_' + model_type + '_filters_' + str(filters) + '_' + str(ct).replace(':', '\') + '.csv' progressfullpath = './ProgressFull/' + dataset_type + '_progress_' + model_type + '_filters_' + str(filters) + '_' + str(ct).replace(':', '\') + '.txt' plotpath = './ProgressFull/' + dataset_type + '_progress_plot_' + model_type + '_filters_' + str(filters) + '_' + str(ct).replace(':', '\') + '.png' modelpath = './ModelSaveTensorFlow/' + dataset_type + '/' + model_type + '_filters_' + str(filters) + '_' + str(ct).replace(':', '\')
If the above solution doesn't work, try to change "\/" into "\" or "\\", as some operating systems prefer the latter
Finally, if nothing else seem to work, use the "os" python library for handling the paths, you can find some online documentation on how to use it here: https://docs.python.org/3/library/os.html
I hope this helps!
Thank you Sir, modification according to your method can run perfectly on Windows 11, it is very helpful for beginners like me, thank you again!
It shows that there is a utf-8 encoding problem, but I do not know how to solve it.I haven't changed the program, Sir. Do you have a good solution?