Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Caricature.feature_inversion doesnt work on python 3 #96

@kmader

Description

@kmader

The problem seems to be combining a range and a list (which are different types in python 3 but not 2)

/usr/local/lib/python3.6/dist-packages/lucid/recipes/caricature.py in feature_inversion(img, model, layer, n_steps, cossim_pow)
     48       transform.jitter(8),
     49       transform.random_scale([0.9, 0.95, 1.05, 1.1] + [1]*4),
---> 50       transform.random_rotate(range(-5, 5) + [0]*5),
     51       transform.jitter(2),
     52     ]

TypeError: unsupported operand type(s) for +: 'range' and 'list'

transform.random_rotate(range(-5, 5) + [0]*5),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions