AIZOOTech/FaceMaskDetection

Remove last layer - pytorch

Opened this issue · 0 comments

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