Let the init be as usual, then you can do: w2.set_value(a_numpy_ndarray)
You should have pickled a numpy ndarray object. If you have pickled old shared variable, you can recover there value by doing old_shared_var.get_value() and pass that new value to set_value(). Fred On Sat, Dec 10, 2016 at 7:56 PM, Doni don <[email protected]> wrote: > I am using 5_convolutional_net.py (https://github.com/Newmu/ > Theano-Tutorials/blob/master/5_convolutional_net.py) to run a CNN with > Theano. It uses the following commands to initialize the weights in CNN. > > w = init_weights((32, 1, 3, 3)) > w2 = init_weights((64, 32, 3, 3)) > w3 = init_weights((128, 64, 3, 3)) > w4 = init_weights((128 * 3 * 3, 625)) > w_o = init_weights((625, 10)) > > I want to ignore these weights and use the weights achieved by another > network as initial ones for the new network. Once I uncomment the above > commands I am getting the below message: > super(TensorVariable, self).__init__(type, owner=owner, > TypeError: must be type, not None > > > > I appreciate any help. > > -- > > --- > 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.
