Skip to content

ValueError: zero-size array to reduction operation maximum which has no identity #3

@dangz90

Description

@dangz90

Hi,

While trying to obtain the fisher vectors, I receive the following error:

Traceback (most recent call last):
  File "C:\Users\dangz\Documents\Fotolog\Aesthetic\descriptor\descriptors_aesthetics.py", line 49, in <module>
    fisher_vectors = fisherClass.get_fisher_vectors_from_folder(filename, 3)
  File "C:\Users\dangz\Documents\Fotolog\Aesthetic\descriptor\aesthetics\fisher\fisher.py", line 58, in get_fisher_vectors_from_folder
    max_shape = np.array([v.shape[0] for v in vectors]).max()
  File "C:\Users\dangz\Anaconda3\lib\site-packages\numpy\core\_methods.py", line 26, in _amax
    return umr_maximum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation maximum which has no identity

I have been able to trace back it back to this line in fisher.py:
normals = [multivariate_normal(mean=means[k], cov=covariances[k]) for k in range(len(weights))]
It seems this returns nothing and doesn't execute the next lines of code.

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