Skip to content

Commit

Permalink
- removed bias layer hast to be at position17 for debugging outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmic committed Aug 25, 2019
1 parent e860c5d commit b26876c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions few_shot_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def all_layers(model):
#print('test lambda', K.eval(test_lambda))


print('vor fitting', lambda_model_layers[17].get_weights()[0])
#print('vor fitting', lambda_model_layers[17].get_weights()[0])

checkpointer = ModelCheckpoint(filepath='checkpoints/model-{epoch:02d}.hdf5', verbose=1)
tensorboard = TensorBoard(log_dir = args.tensorboard_logdir)
Expand Down Expand Up @@ -494,12 +494,19 @@ def print_FindModels(model):

print('calc_out',calc_out[0])

print('vor', lambda_model_layers[17].get_weights()[0])
for l in lambda_model_layers:
if isinstance(l,BiasLayer) and l.bias_num == 2:
print('vor', l.get_weights()[0])

if args.set_model_img_to_weights:
print('\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
lambda_model_layers[17].set_weights([calc_out[0][0],np.array([0])])
print('nach', lambda_model_layers[17].get_weights()[0])
for l in lambda_model_layers:
if isinstance(l,BiasLayer) and l.bias_num == 2:
print("biaslayer2 found",l,l.bias_num)
l.set_weights([calc_out[0][0],np.array([0])])
print('nach l', l.get_weights()[0])
#print('nach [17]', lambda_model_layers[17].get_weights()[0])

print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n')


Expand Down

0 comments on commit b26876c

Please sign in to comment.