jantic / DeOldify

A Deep Learning based project for colorizing and restoring old images (and video!)
MIT License
17.97k stars 2.56k forks source link

AttributeError: 'RecordOnCPU' object has no attribute 'input' data? #465

Closed goldwater668 closed 1 year ago

jantic commented 1 year ago

Unfortunately I won't be able to dig into this without further context/information. What would help is to paste a stack trace, and to provide some information on what you're doing. In particular anything you've done differently, even if it sounds trivial.

goldwater668 commented 1 year ago

@jantic AttributeError Traceback (most recent call last) Cell In[53], line 1 ----> 1 do_fit(‘v1.1’, slice(lr*10))

Cell In[52], line 4, in do_fit(save_name, lrs, pct_start) 2 learn.fit_one_cycle(1, lrs, pct_start=pct_start) 3 learn.save(save_name) ----> 4 learn.show_results()

File /fastai/basic_train.py:407, in Learner.show_results(self, ds_type, rows, *kwargs) 405 preds = self.pred_batch(ds_type) 406 self.callbacks,rec_cpu = self.callbacks → 407 x,y = rec_cpu.input,rec_cpu.target 408 norm = getattr(self.data,‘norm’,False) 409 if norm:

AttributeError: ‘RecordOnCPU’ object has no attribute ‘input’

I get the above error using learn.show_results()

jantic commented 1 year ago

I just made a small fix and I think you should be good to go now. Unfortunately I'm not in a position to formally test this currently but I'm pretty confident in the change. My apologies for having to deal with this!