else:
trainable_count += np.sum([K.count_params(p) for p in layer.trainable_weights])
non_trainable_count += np.sum([K.count_params(p) for p in layer.non_trainable_weights])
return trainable_count, non_trainable_count
def convert_all_kernels_in_model(model):
Converts all convolution kernels in a model from Theano to TensorFlow.
After Change
else:
trainable_count += np.sum([K.count_params(p) for p in layer.trainable_weights])
non_trainable_count += np.sum([K.count_params(p) for p in layer.non_trainable_weights])
return int(trainable_count), int(non_trainable_count)
def convert_all_kernels_in_model(model):
Converts all convolution kernels in a model from Theano to TensorFlow.