ste
(Stefano Giomo)
May 24, 2019, 8:48am
7
Exactly, fast.ai model is a pytorch model
If you try to use your model (remember that under the hood is a standard pytorch model ) without fast.ai, you need to normalize your input manually (and probably reshape it to"size").
Eventually you’ll probably need that…
TL; DR: You don’t need to normalize your input because fast.ai do it for you.
When you call Databunch.normalize(norm_params)
def normalize(self, stats:Collection[Tensor]=None, do_x:bool=True, do_y:bool=False)->None:
"Add normalize transform using `stats` (defaults to `DataBunch.batch_stats`)"
if getattr(self,'norm',False): raise Exception('Can not call normalize twice')
if stats is None: self.stats = self.batch_stats()
else: self.stats = stats
…
1 Like