hello everyone ,I have 2 questions:
-first I’ve read that Inception architecture is a optimized NN model by google ,but in Lab of Week 3 he used it to transfer learning from downloaded model ,so now I get parameters from downloaded model with taking no benefit from Inception architecture ,is it true? if so why not using simpler way?
-second if I’ve disabled weights ,and making parameters not trained ,this will make model training same complexity as without transfer learning?
I’m probably just not understanding your real point here, but what do you mean “no benefit from the Inception architecture”? If you are downloading and using the parameters from a trained Inception Network model, then it is by definition using the Inception Network architecture, right? That’s what the model is. Then the question is whether you need to do any modifications to the architecture and incremental training to achieve your goal. For example, do you need to replace the output layer or the last few layers to produce the output that is specific to your problem? If so, then you’ll need to do additional training with your particular dataset. But you’re starting from the Inception Architecture so you are “benefitting” from it.
That’s my understanding of how Transfer Learning works. I have not taken this particular course, so I don’t know what they say in the lectures here. My understanding of Transfer Learning is from DLS Course 4, Week 2, where Prof Ng covers those concepts. Have you taken DLS Course 4?
what I mean is that in
`local_weights_file = ‘/tmp/inception_v3_weights_tf_dim_ordering_tf_kernels_notop.h5’
pre_trained_model = InceptionV3(input_shape = (150, 150, 3),
include_top = False,
weights = None)
pre_trained_model.load_weights(local_weights_file)`
which model I have transferred the h5 file i have passed as local_weights_file? or InceptionV3?
I do not have access to that assignment, but I would bet that the h5 file just gives you a local copy of the trained InceptionV3 weights. Then you use those with the Inception code. Notice the way they call InceptionV3
with the weights = None
argument. Then you can see it do the “load_weights” call. Have a look at the TF documentation for the Model class and see what that method does. The point is that a “model” is two things: a set of code that runs using a set of weight values, right?
you mean to use Inception I must give it a h5 model of InceptionV3
,and I can’t use this syntax to transfer from other models from internet?
Have you looked at any of the documentation on this? What do the lectures say about it? If your goal is to learn how to use TensorFlow, that is going to involve learning to use their documentation.
Here is the top level Keras page for the pretrained models that they offer.
On that page, you find the link to InceptionV3.
That page shows you how to invoke it with the “imagenet
” weights loaded.
But it looks like the assignment is asking you to load that other set of weights.
Here’s a tutorial style article about saving and loading weights. The first major topic there is about how to use the load_weights()
method.
On the more general topic of Transfer Learning, here’s a great article by F. Chollet about Transfer Learning.
this is what 've explained in Lectures
Yes, that agrees with what you showed above. I think I have already explained the implications of that in my previous responses. It would be a good idea for you to dig deeper by reading the documentation that I just posted.
1 Like