Skip to content

Remove last layer - pytorch #99

@salizaribaf

Description

@salizaribaf

i find this code for remove last layer (my purpose is just extract features):
newـmodel = torch.nn.Sequential(*(list(model.children())[:-1]))

but newـmodel has different type for put image.
The following code no longer works due to the above code:
new_model(image_transposed)
for get output of
thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions