-
Notifications
You must be signed in to change notification settings - Fork 27.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sequential and Parallel processing of Hypernetworks #4334
Closed
Closed
Conversation
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
Really cool. Do the weights have to add to 1.0? or are they scaled relative to one another - for example are a 3.0 weight on one and 1.0 weight on another automatically scaled to 0.75 and 0.25 respectively? |
@captin411 Currently no, you have to set values sum to 1.0. I'm not even getting any proper results with non-1 sum, so I'll add auto normalization very soon. Within 20 minutes, hold on! And finished |
why those k-v pair was shuffled? revert assertion
fix and cleanup
Fixes and reduces memory usage too
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows processing multiple HN sequentially, or in parallel.
How?
.hns file extension can be used for
Hypernetwork Structures
. This structure cannot be trained..hns file uses standard python syntaxes. Only str, list, set, dict, and tuple is allowed.
Example file
[{('a-1', 0.45):0.5, ('ta', 0.45):0.5}, 'p']
Definition
Tuples ( ) are only used to specify Hypernetwork Strength.
('HYPER', 0.1)
Apply HYPER hypernetwork with 0.1 strength
('HYPER')
Equals to Singletons, 'HYPER', {'HYPER'}, ['HYPER'], or ('HYPER, 0.1)
Set are used when parallel processing with equal weighted sum is desired.
{"HN A", "HN B", "HN C"}
Process HN A(x)+ HN B(x)+ HN C(x) then do average
Dictionaries (or, Maps) are used when parallel processing with Custom weights are desired.
NOTE: Weights sum should be 1, or it will produce weird results.
{"HN A": 0.1, "HN B" : 0.2, "HN C": 0.7}
Process HN A(x)*0.1 + HN B(x)*0.2 + HN C(x)* 0.7
String-covered dictionaries / etc
To do some complex processing, dictionaries can be covered by ' or ".
{'{"First A" : 0.5, "First B" : 0.5}' : 0.2, "Next" : 0.8}
Process First A and First B as Parallel. Then get the result, do the weighted sum with Next as 0.2, 0.8
As you expect, you can see those files in selection menu, and do processing as if its normal Hypernetwork File.
Fixed compatibility with 3.7 and tested.
Needs check for memory managements