This is fixed in https://github.com/Theano/Theano/pull/6275
Fred On Fri, Aug 4, 2017 at 1:48 PM Pascal Lamblin <[email protected]> wrote: > Thanks for the report. > I've added that to the list of things we should fix in pickling and > unpickling Function object, see > https://github.com/Theano/Theano/issues/5736 > > > On Thursday, August 3, 2017 at 6:55:46 AM UTC-4, Artur Speiser wrote: >> >> I stumbled upon a weird bug: >> >> X = T.vector() >> theano_func = theano.function([X], {'vec':X**2}) >> theano_func([2,3,4]) >> >> >> {'vec': array([ 4., 9., 16.], dtype=float32)} >> >> with open('test.pkl', 'wb') as f: >> pickle.dump(theano_func, f, protocol=pickle.HIGHEST_PROTOCOL) >> >> with open('test.pkl', 'rb') as f: >> func_loaded = pickle.load(f) >> >> func_loaded([2,3,4]) >> >> [array([ 4., 9., 16.], dtype=float32)] >> >> >> So for some reason after pickling/unpickling the function returns a list >> instead of dict. Any ideas? >> >> >> >> -- > > --- > You received this message because you are subscribed to the Google Groups > "theano-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "theano-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
