hasnanmr commited on
Commit
bb96f79
1 Parent(s): d5c45a5

add instruction

Browse files

to use this weight :
# define the model
model = resnet50(weights=ResNet50_Weights.IMAGENET1K_V2)
for param in model_resnet.parameters():
param.requires_grad = False

# Parameters of newly constructed modules have requires_grad=True by default
num_ftrs = model_resnet.fc.in_features
model_resnet.fc = nn.Linear(num_ftrs, 6)

# Load the weights
state_dict = torch.load('trashnet_resnet50.pth')
# model.load_state_dict(state_dict)

# Switch to evaluation mode
# model.eval()

Files changed (1) hide show
  1. README.md +5 -0
README.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - garythung/trashnet
4
+ pipeline_tag: image-classification
5
+ ---