Skip to content

Commit

Permalink
add list of weights
Browse files Browse the repository at this point in the history
  • Loading branch information
ruhyadi committed Mar 10, 2022
1 parent dad7caa commit 2bcaf53
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions weights/get_weights.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
from ast import arg
import gdown
import argparse

url = "https://drive.google.com/uc?id=1Bw4gUsRBxy8XZDGchPJ_URQjbHItikjw"
output = "./resnet_10.pkl"
gdown.download(url, output, quiet=False)
parser = argparse.ArgumentParser(description='Download weights model')
parser.add_argument('--weights', type=str, default='resnet', help='Weights name')

args = parser.parse_args()

def get_weights(weights):
weights_list = {
'resnet': '1Bw4gUsRBxy8XZDGchPJ_URQjbHItikjw',
'resnet18': '1k_v1RrDO6da_NDhBtMZL5c0QSogCmiRn',
'vgg11': ''
}

url = f"https://drive.google.com/uc?id={weights_list[weights]}"
output = f"./{weights}.pkl"
gdown.download(url, output, quiet=False)

get_weights(args.weights)

0 comments on commit 2bcaf53

Please sign in to comment.