str(len(params)) + " optimizer params vs. " +
str(len(weights)) + " provided weights)")
for p, w in zip(params, weights):
if K.get_value(p).shape != w.shape:
raise Exception("Optimizer weight shape " +
str(K.get_value(p).shape) +
" not compatible with "
After Change
str(pv.shape) +
" not compatible with "
"provided weight shape " + str(w.shape))
weight_value_tuples.append((p, w))
K.batch_set_value(weight_value_tuples)
def get_weights(self):
"""Returns the current weights of the optimizer,