notebook 3, code cell in feature maps visualization section

notebook 3, code cell in feature maps visualization section

by Oleksandr Tarasov -
Number of replies: 3

Hi guys,

in the "Feature maps visualization" section we got the 3rd layer of the model:

intermediate_layer = model_lenet5_v1_mnist_loaded.feature[2]
print(intermediate_layer)

But at the same time, this code throws an error:

AttributeError: 'LeNet5V1' object has no attribute 'feature'

It looks like a property should be "features". In this case, it works.

intermediate_layer = model_lenet5_v1_mnist_loaded.feature[2]
print(intermediate_layer)

Could you please check and fix it?

In reply to Oleksandr Tarasov

Re: notebook 3, code cell in feature maps visualization section

by Oleksandr Tarasov -
Btw, the same actually happens in the next section "Input Images" in the defined function "viz_plain":

def viz_plain(layer_num, img, model, device):

...
layer = model_lenet5_v1_mnist_loaded.feature[layer_num]
...
In reply to Oleksandr Tarasov

Re: notebook 3, code cell in feature maps visualization section

by George Ciubotariu -
Hello!
There are a few assumptions made about your model's structure.
The feature block should be implemented according to the "A. feature extractor" specifications.
Although the exitence of self.features is mandatory, I believe that adopting the suggested variable names won't hinder solving the homework.
Clarification notes will be added to the notebook. Thank you!
In reply to George Ciubotariu

Re: notebook 3, code cell in feature maps visualization section

by Oleksandr Tarasov -
Ok got it, it is just naming troubles, thank you for the answer.