Skip to content

chapter-4/1_feature_extraction.ipynb assumed running on colab #163

Open
@gitgithan

Description

@gitgithan

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

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions