This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As far as I know you can put the .desktop file in ~/.local/share/kservices5/ServiceMenus/ if you're on Plasma 5 | |
Don't forget to edit the commented lines if you want it to work as you wish. | |
The right-click function does not seem to work when there is a space in the path. Yet. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#input tensors are generally stacked layers from multiple models. | |
#autoweight_power will exponentially eliminate discrepancies. I used values from 2 to 16. | |
#proximity_power also powers the distance but at the moment of being evaluated, not after averaging. This reinforces clustered informations and can prevent discrepancies from being eliminated. Useful in some case but generally not recommanded. | |
#first model as ref options are better to be left alone lol. Use false. | |
#Also works with any tensor of course but conditionning is not that interesting with it. | |
def merge_tensors_by_consensus(tensors, autoweight_power, proximity_power, first_model_as_ref, first_model_as_ref_ignore, use_cuda=True): | |
if all(torch.equal(tensors[0], tensor) for tensor in tensors[1:]): | |
return tensors[0] | |
tensor_shape = tensors[0].shape | |
min_val = torch.full(tensor_shape, float("inf")) |