Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Possible issue in forward sampling #134

Open
tdiethe opened this issue Nov 23, 2018 · 1 comment
Open

Possible issue in forward sampling #134

tdiethe opened this issue Nov 23, 2018 · 1 comment

Comments

@tdiethe
Copy link
Contributor

tdiethe commented Nov 23, 2018

Describe the bug
When doing forward sampling, my code hits the following line:

v.graph = new_model.graph

This looks like a bug to me as the model class never has a graph attribute at the top level (or does it?).

To Reproduce
Steps to reproduce the behavior:

  1. Build a model like BNN
  2. Run inference on BNN on Task A.
  3. Fine tune for task A using posteriors from 2.
  4. Predict on task A using fine tuned model from 3.
  5. Run inference on BNN using posteriors from 2 on Task B.
  6. Fine tune for task A using posteriors from 5.
  7. Predict on task A using fine tuned model from 6.
  8. Fine tune for task B using posteriors from 5.
  9. Predict on task B using fine tuned model from 8.
  10. See error

Desktop (please complete the following information):

  • OS: OSX
  • Python version 3.6
  • MXNet version 1.3.0
  • MXFusion version 0.2.2
  • MXNet context CPU
  • MXNet dtype float32

Additional context
Add any other context about the problem here.

@meissnereric
Copy link
Contributor

This is a bug on that line of code.

It should probably look something:

    new_leaf = v.replicate(var_map=var_map,
replication_function=lambda x: ('recursive', 'recursive'))
    new_leaf.graph = new_model.components_graph

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants