Skip to content

Commit

Permalink
Merge pull request fastai#159 from radekosmulski/minor_changes_to_con…
Browse files Browse the repository at this point in the history
…v_learner

Minor changes to conv learner
  • Loading branch information
jph00 authored Feb 19, 2018
2 parents 7f15c5e + a252c55 commit 84d8ad2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fastai/conv_learner.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ConvnetBuilder():
is_reg (bool): is a regression?
ps (float or array of float): dropout parameters
xtra_fc (list of ints): list of hidden layers with # hidden neurons
xtra_cut (int): # layers earlier than default to cut the model, detault is 0
xtra_cut (int): # layers earlier than default to cut the model, default is 0
"""

def __init__(self, f, c, is_multi, is_reg, ps=None, xtra_fc=None, xtra_cut=0):
Expand Down Expand Up @@ -93,9 +93,9 @@ def __init__(self, data, models, precompute=False, **kwargs):
self.precompute = precompute

@classmethod
def pretrained(cls, f, data, ps=None, xtra_fc=None, xtra_cut=0, **kwargs):
def pretrained(cls, f, data, ps=None, xtra_fc=None, xtra_cut=0, precompute=False, **kwargs):
models = ConvnetBuilder(f, data.c, data.is_multi, data.is_reg, ps=ps, xtra_fc=xtra_fc, xtra_cut=xtra_cut)
return cls(data, models, **kwargs)
return cls(data, models, precompute, **kwargs)

@property
def model(self): return self.models.fc_model if self.precompute else self.models.model
Expand Down

0 comments on commit 84d8ad2

Please sign in to comment.