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

self.net.train()? Is is a valid function? #11

Open
ChenYutongTHU opened this issue Jul 15, 2019 · 2 comments
Open

self.net.train()? Is is a valid function? #11

ChenYutongTHU opened this issue Jul 15, 2019 · 2 comments

Comments

@ChenYutongTHU
Copy link

While reading this code, solver.py, I found in line 431 and line 433 both functions self.net.train() and self.net.eval() are undefined functions, neither defined in model.py or pytorch API. However, no error came out when I did the training. Is there anyone who can enlighten me?
Thanks a bunch

def net_mode(self, train):
        if not isinstance(train, bool):
            raise('Only bool type is supported. True or False')

        if train:
            **self.net.train()**
        else:
            **self.net.eval()**
@1Konny
Copy link
Owner

1Konny commented Jul 16, 2019

Hi

no it's useless and you can ignore it.
sorry for all weird things in this code

@ChenYutongTHU
Copy link
Author

Getcha Thanks:)

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

2 participants