freeze layers while passing a part of features
up vote
0
down vote
favorite
I want to design a network using keras like this pic. And there is a problem I need some help. F* is a feature tensor like a sentence or a picture, the shared layers is a block comprise several layers. F* will merge together after passing the shared layer. Then merged feature will pass an output layer. The structure is described below.
The problem is I want to train this network only use F1. Namely, when F2 pass the shared layers, shared layers are frozen.
I would very appreciate if you could answer me with pseudocode.
keras deep-learning artificial-intelligence
add a comment |
up vote
0
down vote
favorite
I want to design a network using keras like this pic. And there is a problem I need some help. F* is a feature tensor like a sentence or a picture, the shared layers is a block comprise several layers. F* will merge together after passing the shared layer. Then merged feature will pass an output layer. The structure is described below.
The problem is I want to train this network only use F1. Namely, when F2 pass the shared layers, shared layers are frozen.
I would very appreciate if you could answer me with pseudocode.
keras deep-learning artificial-intelligence
Have a look at: github.com/fchollet/deep-learning-with-python-notebooks/blob/…. It is from Chollet's book, which I recommend. This chapter describes merging models and earlier chapters describe freezing layers. I haven't done both simultaneously, so I don't have any working code.
– from keras import michael
Nov 9 at 21:39
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to design a network using keras like this pic. And there is a problem I need some help. F* is a feature tensor like a sentence or a picture, the shared layers is a block comprise several layers. F* will merge together after passing the shared layer. Then merged feature will pass an output layer. The structure is described below.
The problem is I want to train this network only use F1. Namely, when F2 pass the shared layers, shared layers are frozen.
I would very appreciate if you could answer me with pseudocode.
keras deep-learning artificial-intelligence
I want to design a network using keras like this pic. And there is a problem I need some help. F* is a feature tensor like a sentence or a picture, the shared layers is a block comprise several layers. F* will merge together after passing the shared layer. Then merged feature will pass an output layer. The structure is described below.
The problem is I want to train this network only use F1. Namely, when F2 pass the shared layers, shared layers are frozen.
I would very appreciate if you could answer me with pseudocode.
keras deep-learning artificial-intelligence
keras deep-learning artificial-intelligence
asked Nov 9 at 5:17
woaisxxd
277
277
Have a look at: github.com/fchollet/deep-learning-with-python-notebooks/blob/…. It is from Chollet's book, which I recommend. This chapter describes merging models and earlier chapters describe freezing layers. I haven't done both simultaneously, so I don't have any working code.
– from keras import michael
Nov 9 at 21:39
add a comment |
Have a look at: github.com/fchollet/deep-learning-with-python-notebooks/blob/…. It is from Chollet's book, which I recommend. This chapter describes merging models and earlier chapters describe freezing layers. I haven't done both simultaneously, so I don't have any working code.
– from keras import michael
Nov 9 at 21:39
Have a look at: github.com/fchollet/deep-learning-with-python-notebooks/blob/…. It is from Chollet's book, which I recommend. This chapter describes merging models and earlier chapters describe freezing layers. I haven't done both simultaneously, so I don't have any working code.
– from keras import michael
Nov 9 at 21:39
Have a look at: github.com/fchollet/deep-learning-with-python-notebooks/blob/…. It is from Chollet's book, which I recommend. This chapter describes merging models and earlier chapters describe freezing layers. I haven't done both simultaneously, so I don't have any working code.
– from keras import michael
Nov 9 at 21:39
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53220245%2ffreeze-layers-while-passing-a-part-of-features%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have a look at: github.com/fchollet/deep-learning-with-python-notebooks/blob/…. It is from Chollet's book, which I recommend. This chapter describes merging models and earlier chapters describe freezing layers. I haven't done both simultaneously, so I don't have any working code.
– from keras import michael
Nov 9 at 21:39