Skip to content
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

Controller eval code wrong in readme (part 1) #10

Open
franciscorba opened this issue Dec 18, 2018 · 0 comments
Open

Controller eval code wrong in readme (part 1) #10

franciscorba opened this issue Dec 18, 2018 · 0 comments

Comments

@franciscorba
Copy link

franciscorba commented Dec 18, 2018

When I tried to run your examples code I get this:

import netdef_slim as nd
nd.load_module('FlowNet3/CSS/controller.py')
Using /home/brisa/frbarbos/lmbspecialops/build/lib/lmbspecialops.so
<module 'None' from 'FlowNet3/CSS/controller.py'>
c = Controller()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'Controller' is not defined

I found to possible solutions:

  1. save the output of load_module is a variable:
import netdef_slim as nd
M = nd.load_module('FlowNet3/CSS/controller.py')
Using /home/brisa/frbarbos/lmbspecialops/build/lib/lmbspecialops.so
c = M.Controller()
evolution <00__flyingThings3D.train__S_fine_half>: 00__flyingThings3D.train__S_fine_half        COMPLETE
  1. Using directly Controller in the load_module output:
import netdef_slim as nd
c = nd.load_module('FlowNet3/CSS/controller.py').Controller()
Using /home/brisa/frbarbos/lmbspecialops/build/lib/lmbspecialops.so
evolution <00__flyingThings3D.train__S_fine_half>: 00__flyingThings3D.train__S_fine_half        COMPLETE
@franciscorba franciscorba changed the title Controller eval code wrong in readme Controller eval code wrong in readme (part 1) Dec 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant