furkanu / deeplearning.ai-pytorch

PyTorch Implementations of Coursera's Deep Learning(deeplearning.ai) Specialization
MIT License
147 stars 32 forks source link

pretrained weights for FaceNet and Emoji data? #1

Closed watchernyu closed 5 years ago

watchernyu commented 5 years ago

Hi! I have cloned your repo and tried to run the files and encountered two missing file error: when I run the FaceNet code, I found the following error indicates that the weight is missing:

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-13-6d45e7bac014> in <module>
      1 loss_fn = TripletLoss()
      2 optimizer = optim.Adam(FRmodel.parameters())
----> 3 load_weights_from_FaceNet(FRmodel)

~/Desktop/ml_ross/deeplearning.ai-pytorch/4- Convolutional Neural Networks/Week 4/Face Recognition (Done)/inception_model.py in load_weights_from_FaceNet(model)
    458 
    459 def load_weights_from_FaceNet(model):
--> 460     weights_dict = load_weights()
    461 
    462     state_dict = {}

~/Desktop/ml_ross/deeplearning.ai-pytorch/4- Convolutional Neural Networks/Week 4/Face Recognition (Done)/inception_model.py in load_weights()
    359     # Set weights path
    360     dirPath = './weights'
--> 361     fileNames = filter(lambda f: not f.startswith('.'), os.listdir(dirPath))
    362     paths = {}
    363     weights_dict = {}

FileNotFoundError: [Errno 2] No such file or directory: './weights'

When I run the Emojify code, I found that the emoji data file seems to be missing:

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-2-8319399d5196> in <module>
----> 1 X_train, Y_train = read_csv('data/train_emoji.csv')
      2 X_test, Y_test = read_csv('data/tesss.csv')

~/Desktop/ml_ross/deeplearning.ai-pytorch/5- Sequence Models/Week 2/2- Emojify/emo_utils.py in read_csv(filename)
     35     emoji = []
     36 
---> 37     with open (filename) as csvDataFile:
     38         csvReader = csv.reader(csvDataFile)
     39 

FileNotFoundError: [Errno 2] No such file or directory: 'data/train_emoji.csv'

Do you mind also upload the facenet weights as well as the emoji data to your repo, or direct me to where I can download that? Thank you very much for the help!

furkanu commented 5 years ago

Hello, sorry for the late reply. I found this repository which also uploaded facenet weights and emoji data: AlbertHG / Coursera-Deep-Learning-deeplearning.ai You can also download them directly from the Coursera course. You dont have to pay to be able to download them. You can audit the course and see the content of the notebooks. You may want to find a way of downloading the folders instead of downloading the files one by one.