OSError: [Errno 22] Invalid argument: '..\x08_epoch_model_state.pt'

when i run this state = torch.load('..\10_epoch_model_state.pt', map_location=lambda storage, loc: storage), i'm getting this error. how to fix it : OSError: [Errno 22] Invalid argument: '..\x08_epoch_model_state.pt'

Upvotes: 0

Views: 319

Answers (1)

ForceBru
ForceBru

Reputation: 44838

'\10' is the character with ASCII code 10 in octal:

>>> '\10'
'\x08'

Use raw string literals:

>>> r'\10'
'\\10'

Upvotes: 1

Related Questions