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

How to run? #7

Open
nullFoo opened this issue Aug 24, 2018 · 2 comments
Open

How to run? #7

nullFoo opened this issue Aug 24, 2018 · 2 comments

Comments

@nullFoo
Copy link

nullFoo commented Aug 24, 2018

So you have the defined functions but how do you run it? I don't know what to put as the "self" parameter of all the functions

@de-sh
Copy link

de-sh commented Oct 23, 2018

'self' is supposed to be not interfaced with by the programmer. It is for the program/interpreter to understand that the method works on the instance/object for which it is defined.

As for running the program, read this part of the README.md

@xWuWux
Copy link

xWuWux commented Dec 9, 2023

Understanding the "self" Parameter:
In Python, when defining methods within a class, the first parameter is conventionally named self. This parameter represents the instance of the class and allows methods to access and modify the attributes of the instance. However, when calling these methods, you don't explicitly pass a value for self – Python automatically handles it.

How to Run the Program:
Command Line:

Open a terminal or command prompt.
Navigate to the directory where the Python scripts (brute.py, network.py, train.py) are located.
Run brute.py:

Execute the following command:
python3 brute.py

This will initiate the brute force testing of every network.
Understanding self in the Context of the Program:

When you run brute.py, it creates instances of the Network class and calls methods on those instances.
For example, network_obj.create_random() creates a random network for network_obj, and network_obj.train(dataset) trains the network.
You don't need to explicitly pass a value for self – Python takes care of that.
Viewing Results:

The program will print information about the trained networks, including their parameters and accuracy.
The top 5 networks with the highest accuracy will be displayed.

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

3 participants