I try to extract features from an image. I have used the following bit of code, but I get an error. Why doesn't it support indexing?
def prune_vgg16_conv_layer(model, layer_index, filter_index): _, conv = model.features._modules.items()[layer_index] next_conv = None offset = 1
_, conv = model.features._modules.items()[layer_index]
TypeError: 'odict_items' object does not support indexing
Comments
Post a Comment