masksembles
masksembles copied to clipboard
Mask generation functions *sometimes* fail to produce proper masks
Here is a problem. When result from here fails to produce proper masks -- the number of features in those masks isn't equal to the number of channels required.
The current solution is just to try searching for a new value of scale parameter via grid-search -- trying values from np.linspace. This solution is far from perfect since for some function configurations it fails to find proper scale. Need to implement something more sophisticated like binary search or something so it would work for every possible configuration.
Here I change the condition from ">=" to "==", and resolved the problem of fails to produce mask.