|
@@ -26,12 +26,10 @@ def save_wmark_signatures(model):
|
|
|
np.save(fname_b, wmark_regularizer.get_signature())
|
|
|
|
|
|
|
|
|
-
|
|
|
-def get_layer_weights_and_predicted(model, checkpoint_save_path, target_blk_id):
|
|
|
+
|
|
|
+def get_layer_weights_and_predicted(target_layer):
|
|
|
x = np.load(fname_x)
|
|
|
- model.load_weights(checkpoint_save_path)
|
|
|
-
|
|
|
- target_layer = model.get_layer(index=target_blk_id)
|
|
|
+
|
|
|
layer_weights = target_layer.get_weights()
|
|
|
weight = (np.array(layer_weights[0])).mean(axis=3)
|
|
|
pred_bparam = np.dot(weight.reshape(1, weight.size), x)
|