Why did this error occur considering that the directory path was already provided?
Traceback (most recent call last):
File “main.py”, line 12, in
checkpoint = utility.checkpoint(args)
File “F:\DASR-main\utility.py”, line 71, in init
_make_dir(self.dir)
AttributeError: ‘checkpoint’ object has no attribute ‘dir’
class checkpoint():
def __init__(self, args):
self.args = args
self.ok = True
self.log = torch.Tensor()
now = datetime.datetime.now().strftime('%Y-%m-%d-%H:%M:%S')
if args.blur_type == 'iso_gaussian':
self.dir = './experiment/' + args.save + '_x' + str(int(args.scale[0])) + '_' + args.mode + '_iso'
elif args.blur_type == 'aniso_gaussian':
self.dir = './experiment/' + args.save + '_x' + str(int(args.scale[0])) + '_' + args.mode + '_aniso'
def _make_dir(path):
if not os.path.exists(path): os.makedirs(path)
_make_dir(self.dir)
_make_dir(self.dir + '/model')
_make_dir(self.dir + '/results')