mahf708 commited on
Commit
7de4d03
·
verified ·
1 Parent(s): 48722a5

record where kept layers sit in the network

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. kit/export_fme_latents.py +5 -1
README.md CHANGED
@@ -48,7 +48,7 @@ comparable node for node. Change the intervention by editing the `overwrite` blo
48
  `n_forward_steps` (the forcing covers January and February 2015).
49
 
50
  To record the latents as well, and to steer a layer along a feature, use the exporter in the kit
51
- (`kit/export_fme_latents.py`; it needs [xaig](https://pypi.org/project/xaig/) 0.2 or later in the same
52
  environment):
53
 
54
  ```console
 
48
  `n_forward_steps` (the forcing covers January and February 2015).
49
 
50
  To record the latents as well, and to steer a layer along a feature, use the exporter in the kit
51
+ (`kit/export_fme_latents.py`; it needs [xaig](https://pypi.org/project/xaig/) 0.3 or later in the same
52
  environment):
53
 
54
  ```console
kit/export_fme_latents.py CHANGED
@@ -492,9 +492,12 @@ def main(argv=None):
492
 
493
  labels = rec.labels()
494
  layers = [(labels[i], rec.arrays[i]) for i in sorted(rec.arrays)]
 
495
  if sorted(rec.arrays) != list(range(len(layers))):
496
- # the reader indexes layers by position; keep the network's numbering in the label
 
497
  layers = [(f"{labels[i]} [network layer {i}]", rec.arrays[i]) for i in sorted(rec.arrays)]
 
498
  step_seconds = (
499
  int(
500
  round(
@@ -510,6 +513,7 @@ def main(argv=None):
510
  grid=grid,
511
  times=times,
512
  layers=layers,
 
513
  fields=field_arrays or None,
514
  field_times=field_times if field_arrays else None,
515
  model=args.model_name or run_id,
 
492
 
493
  labels = rec.labels()
494
  layers = [(labels[i], rec.arrays[i]) for i in sorted(rec.arrays)]
495
+ network_layers = None
496
  if sorted(rec.arrays) != list(range(len(layers))):
497
+ # the reader indexes layers by position; record where each sits in the network, so
498
+ # that a basis is matched by that place (and keep it in the label, for people)
499
  layers = [(f"{labels[i]} [network layer {i}]", rec.arrays[i]) for i in sorted(rec.arrays)]
500
+ network_layers = sorted(rec.arrays)
501
  step_seconds = (
502
  int(
503
  round(
 
513
  grid=grid,
514
  times=times,
515
  layers=layers,
516
+ network_layers=network_layers,
517
  fields=field_arrays or None,
518
  field_times=field_times if field_arrays else None,
519
  model=args.model_name or run_id,