mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
Implement model (and some factor) coder with evolving (#52)
* store code into FBImplementation * fix path related bugs * fix a bug * fix factor related small bugs * re-submit all model related code * new code to model coder * finish the model evolving code --------- Co-authored-by: xuyang1 <xuyang1@microsoft.com>
This commit is contained in:
@@ -22,7 +22,7 @@ class ModelImpValEval:
|
||||
- If the model structure is similar, the output will change in similar way when we change the input.
|
||||
|
||||
Challenge:
|
||||
- The key difference between it and implementing factors is that we have parameters in the layers (Factor operators often have no parameters or are given parameters).
|
||||
- The key difference between it and implementing models is that we have parameters in the layers (Model operators often have no parameters or are given parameters).
|
||||
- we try to initialize the model param in similar value. So only the model structure is different.
|
||||
|
||||
Comparing the correlation of following sequences
|
||||
@@ -41,9 +41,8 @@ class ModelImpValEval:
|
||||
for _ in range(round_n):
|
||||
# run different model initial parameters.
|
||||
for init_val in [-0.2, -0.1, 0.1, 0.2]:
|
||||
data, exec_config = get_data_conf(init_val)
|
||||
gt_res = gt.execute(data=data, config=exec_config)
|
||||
res = gen.execute(data=data, config=exec_config)
|
||||
_, gt_res = gt.execute(input_value=init_val, param_init_value=init_val)
|
||||
_, res = gen.execute(input_value=init_val, param_init_value=init_val)
|
||||
eval_pairs.append((res, gt_res))
|
||||
|
||||
# flat and concat the output
|
||||
|
||||
Reference in New Issue
Block a user