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
@fromkerasimportmichael thank you I've found another way to solve this problem
– woaisxxd
Nov 29 at 6:53
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
@fromkerasimportmichael thank you I've found another way to solve this problem
– woaisxxd
Nov 29 at 6:53
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
@fromkerasimportmichael thank you I've found another way to solve this problem
– woaisxxd
Nov 29 at 6:53
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
@fromkerasimportmichael thank you I've found another way to solve this problem
– woaisxxd
Nov 29 at 6:53
@fromkerasimportmichael thank you I've found another way to solve this problem
– woaisxxd
Nov 29 at 6:53
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
@fromkerasimportmichael thank you I've found another way to solve this problem
– woaisxxd
Nov 29 at 6:53