notebook 3, code cell in feature maps visualization section

notebook 3, code cell in feature maps visualization section

von Oleksandr Tarasov -
Anzahl Antworten: 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?

Als Antwort auf Oleksandr Tarasov

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

von 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]
...
Als Antwort auf Oleksandr Tarasov

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

von 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!