We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, this comes from: https://github.com/fastai/courses/blob/master/deeplearning2/rossman.ipynb
the below code doesn't work using keras 2.0. Would anyone know what are the needed changes to get this to work?
def my_init(scale): return lambda shape, name=None: initializations.uniform(shape, scale=scale, name=name) def emb_init(shape, name=None): return initializations.uniform(shape, scale=2/(shape[1]+1), name=name) def get_emb(feat): name, c = cat_map_info(feat) #c2 = cat_var_dict[name] c2 = (c+1)//2 if c2>50: c2=50 inp = Input((1,), dtype='int64', name=name+'_in') # , W_regularizer=l2(1e-6) u = Flatten(name=name+'_flt')(Embedding(c, c2, input_length=1, init=emb_init)(inp)) # u = Flatten(name=name+'_flt')(Embedding(c, c2, input_length=1)(inp)) return inp,u def get_contin(feat): name = feat[0][0] inp = Input((1,), name=name+'_in') return inp, Dense(1, name=name+'_d', init=my_init(1.))(inp)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, this comes from: https://github.com/fastai/courses/blob/master/deeplearning2/rossman.ipynb
the below code doesn't work using keras 2.0. Would anyone know what are the needed changes to get this to work?
The text was updated successfully, but these errors were encountered: