Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model.outputs does not changed in svd compressor #19

Open
rafikg opened this issue Sep 4, 2019 · 0 comments
Open

model.outputs does not changed in svd compressor #19

rafikg opened this issue Sep 4, 2019 · 0 comments

Comments

@rafikg
Copy link

rafikg commented Sep 4, 2019

Hi @bachi55

new_model = Model(model.inputs, model.outputs)

I debug the code and I see that the even the layers are swapped correctly but the model.output still have the old output not the new FactorizedDense layer

Model: "model_1"
....
....

_________________________________________________________________
dense_1 (FactorizedDense)    (None, 512)               193024    
_________________________________________________________________
batch_normalization_14 (Batc (None, 512)               2048      
_________________________________________________________________
dropout_10 (Dropout)         (None, 512)               0         
_________________________________________________________________
**dense_2 (FactorizedDense)    (None, 10)                4186**      
=================================================================
Total params: 15,001,418
Trainable params: 14,991,946
Non-trainable params: 9,472

but model.outputs still having the older dense_2 layer:

model.outputs
Out[4]: [<tf.Tensor 'dense_2/Softmax:0' shape=(?, 10) dtype=float32>]

Here the new model 
Model: new model
.......
......

dense_1 (FactorizedDense)    (None, 512)               193024    
_________________________________________________________________
batch_normalization_14 (Batc (None, 512)               2048      
_________________________________________________________________
dropout_10 (Dropout)         (None, 512)               0         
_________________________________________________________________
**dense_2 (Dense)              (None, 10)                5130**      
=================================================================
Total params: 14,931,786
Trainable params: 14,922,314
Non-trainable params: 9,472

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant