If i am using this learn.export(‘model_res.pkl’) then I am getting FileNotFoundError: [Errno 2] No such file or directory: ‘,\model_res.pkl’
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Input In [9], in <cell line: 1>()
----> 1 learn.export('model_res.pkl')
File ~\anaconda3\envs\torch\lib\site-packages\fastai\learner.py:404, in export(self, fname, pickle_module, pickle_protocol)
401 with warnings.catch_warnings():
402 #To avoid the warning that come from PyTorch about model not being checked
403 warnings.simplefilter("ignore")
--> 404 torch.save(self, self.path/fname, pickle_module=pickle_module, pickle_protocol=pickle_protocol)
405 self.create_opt()
406 if state is not None: self.opt.load_state_dict(state)
File ~\anaconda3\envs\torch\lib\site-packages\torch\serialization.py:376, in save(obj, f, pickle_module, pickle_protocol, _use_new_zipfile_serialization)
340 """save(obj, f, pickle_module=pickle, pickle_protocol=DEFAULT_PROTOCOL, _use_new_zipfile_serialization=True)
341
342 Saves an object to a disk file.
(...)
372 >>> torch.save(x, buffer)
373 """
374 _check_dill_version(pickle_module)
--> 376 with _open_file_like(f, 'wb') as opened_file:
377 if _use_new_zipfile_serialization:
378 with _open_zipfile_writer(opened_file) as opened_zipfile:
File ~\anaconda3\envs\torch\lib\site-packages\torch\serialization.py:230, in _open_file_like(name_or_buffer, mode)
228 def _open_file_like(name_or_buffer, mode):
229 if _is_path(name_or_buffer):
--> 230 return _open_file(name_or_buffer, mode)
231 else:
232 if 'w' in mode:
File ~\anaconda3\envs\torch\lib\site-packages\torch\serialization.py:211, in _open_file.__init__(self, name, mode)
210 def __init__(self, name, mode):
--> 211 super(_open_file, self).__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: ',\\model_res.pkl'