You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a problem while debugging this project, mainly due to the file encoding format.
----->>
Traceback (most recent call last):
File "E:\PyCharm_2023\Learn_Pytorch\YOLOv4\ScaledYOLOv4-yolov4-large\train.py", line 443, in
train(hyp, opt, device, tb_writer)
File "E:\PyCharm_2023\Learn_Pytorch\YOLOv4\ScaledYOLOv4-yolov4-large\train.py", line 53, in train
data_dict = yaml.load(f, Loader=yaml.FullLoader) # model dict
File "E:\Anaconda3\envs\torch\lib\site-packages\yaml_init_.py", line 79, in load
loader = Loader(stream)
File "E:\Anaconda3\envs\torch\lib\site-packages\yaml\loader.py", line 24, in init
Reader.init(self, stream)
File "E:\Anaconda3\envs\torch\lib\site-packages\yaml\reader.py", line 85, in init
self.determine_encoding()
File "E:\Anaconda3\envs\torch\lib\site-packages\yaml\reader.py", line 124, in determine_encoding
self.update_raw()
File "E:\Anaconda3\envs\torch\lib\site-packages\yaml\reader.py", line 178, in update_raw
data = self.stream.read(size)
UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 408: illegal multibyte sequence
In the train.py file, make the following modifications(Lines 49 to 57):
'''
# Configure
cuda = device.type != 'cpu'
init_seeds(2 + rank)
with open(opt.data,encoding='utf-8') as f:
data_dict = yaml.load(f, Loader=yaml.FullLoader) # model dict
train_path = data_dict['train']
test_path = data_dict['val']
nc, names = (1, ['item']) if opt.single_cls else (int(data_dict['nc']), data_dict['names']) # number classes, names
assert len(names) == nc, '%g names found for nc=%g dataset in %s' % (len(names), nc, opt.data) # check
'''
The text was updated successfully, but these errors were encountered:
I encountered a problem while debugging this project, mainly due to the file encoding format.
----->>
Traceback (most recent call last):
File "E:\PyCharm_2023\Learn_Pytorch\YOLOv4\ScaledYOLOv4-yolov4-large\train.py", line 443, in
train(hyp, opt, device, tb_writer)
File "E:\PyCharm_2023\Learn_Pytorch\YOLOv4\ScaledYOLOv4-yolov4-large\train.py", line 53, in train
data_dict = yaml.load(f, Loader=yaml.FullLoader) # model dict
File "E:\Anaconda3\envs\torch\lib\site-packages\yaml_init_.py", line 79, in load
loader = Loader(stream)
File "E:\Anaconda3\envs\torch\lib\site-packages\yaml\loader.py", line 24, in init
Reader.init(self, stream)
File "E:\Anaconda3\envs\torch\lib\site-packages\yaml\reader.py", line 85, in init
self.determine_encoding()
File "E:\Anaconda3\envs\torch\lib\site-packages\yaml\reader.py", line 124, in determine_encoding
self.update_raw()
File "E:\Anaconda3\envs\torch\lib\site-packages\yaml\reader.py", line 178, in update_raw
data = self.stream.read(size)
UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 408: illegal multibyte sequence
In the train.py file, make the following modifications(Lines 49 to 57):
'''
'''
The text was updated successfully, but these errors were encountered: