Open gitgithan opened 1 year ago
features = extract_features('cat.jpg', model) is assuming it is run in colab. I suggest features = extract_features(IMG_PATH, model) so it also works locally off colab and uses IMG_PATH which was defined in the cell right before
features = extract_features('cat.jpg', model)
features = extract_features(IMG_PATH, model)
IMG_PATH = '../../sample-images/cat.jpg' if IS_COLAB_ENV: !curl https://raw.githubusercontent.com/PracticalDL/Practical-Deep-Learning-Book/master/sample-images/cat.jpg --output cat.jpg IMG_PATH = 'cat.jpg'
Same for the %timeit features = extract_features('cat.jpg', model) line, to change to %timeit features = extract_features(IMG_PATH, model)
%timeit features = extract_features('cat.jpg', model)
%timeit features = extract_features(IMG_PATH, model)
features = extract_features('cat.jpg', model)
is assuming it is run in colab. I suggestfeatures = extract_features(IMG_PATH, model)
so it also works locally off colab and uses IMG_PATH which was defined in the cell right beforeSame for the
%timeit features = extract_features('cat.jpg', model)
line, to change to%timeit features = extract_features(IMG_PATH, model)