0
我希望在JupyterNotebook運行some Tensorflow code。上JupyterNotebook,而不是在終端中運行命令Tensorflow
如果在終端運行它,然後上面的鏈接提供了這樣的說明:
python src/validate_on_lfw.py ~/datasets/lfw/lfw_mtcnnpy_160 ~/models/facenet/20170512-110547
問:我怎麼就Jupyter筆記本運行呢?感謝 例如,
# Load the model
facenet.load_model(args.model)
只需使用~/models/facenet/20170512-110547
# Load the model
facenet.load_model('~/models/facenet/20170512-110547')
更換args.model
會給錯誤
usage: ipykernel_launcher.py [-h] [--lfw_batch_size LFW_BATCH_SIZE]
[--image_size IMAGE_SIZE] [--lfw_pairs LFW_PAIRS]
[--lfw_file_ext {jpg,png}]
[--lfw_nrof_folds LFW_NROF_FOLDS]
lfw_dir model
ipykernel_launcher.py: error: too few arguments
sys.argv
Out[5]:
['/anaconda/envs/tensorflow/lib/python2.7/site-packages/ipykernel_launcher.py',
'-f',
'/Users/my_name/Library/Jupyter/runtime/kernel-770c12c9-8fbe-44f7-91dd-4b0a5c5d7537.json']
什麼是你的錯誤?並分享代碼? – Ultraviolet
修訂添加錯誤。我在做一個非常即席方式... –
好像你沒有推出jupyter筆記本。首先啓動筆記本電腦,然後運行這些命令。 – Aaron