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

Add TensorFlow/Keras Neural Networks for Classification #11572

Closed
wants to merge 29 commits into from

Conversation

asRot0
Copy link

@asRot0 asRot0 commented Sep 18, 2024

Describe your change:

fully_connected_mnist.py demonstrates a basic fully-connected feed-forward network with two hidden layers, ReLU activation, and dropout for regularization.

cnn_mnist.py implements a Convolutional Neural Network (CNN) with multiple convolutional, pooling, and batch normalization layers for feature extraction and down-sampling, followed by fully connected layers for classification.

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Add or change doctests? -- Note: Please avoid changing both code and tests in a single pull request.
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms include at least one URL that points to Wikipedia or another similar explanation.
  • If this pull request resolves one or more open issues then the description above includes the issue number(s) with a closing keyword: "Fixes #ISSUE-NUMBER".

@algorithms-keeper algorithms-keeper bot added awaiting reviews This PR is ready to be reviewed tests are failing Do not merge until tests pass labels Sep 18, 2024
Copy link

@algorithms-keeper algorithms-keeper bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/fully_connected_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/fully_connected_mnist.py Outdated Show resolved Hide resolved
Copy link

@algorithms-keeper algorithms-keeper bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/fully_connected_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/fully_connected_mnist.py Outdated Show resolved Hide resolved
@asRot0 asRot0 closed this Sep 18, 2024
@asRot0 asRot0 reopened this Sep 18, 2024
Copy link

@algorithms-keeper algorithms-keeper bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/fully_connected_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/fully_connected_mnist.py Outdated Show resolved Hide resolved
Copy link

@algorithms-keeper algorithms-keeper bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/cnn_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/fully_connected_mnist.py Outdated Show resolved Hide resolved
machine_learning/neural_networks/fully_connected_mnist.py Outdated Show resolved Hide resolved
@algorithms-keeper algorithms-keeper bot removed the tests are failing Do not merge until tests pass label Sep 18, 2024
Copy link
Author

@asRot0 asRot0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@imSanko imSanko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

@asRot0 asRot0 requested a review from imSanko September 19, 2024 14:45
Copy link
Author

@asRot0 asRot0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@asRot0 asRot0 closed this Sep 19, 2024
@asRot0 asRot0 reopened this Sep 19, 2024
@asRot0 asRot0 closed this Sep 19, 2024
@asRot0 asRot0 reopened this Sep 19, 2024
@algorithms-keeper algorithms-keeper bot added the require descriptive names This PR needs descriptive function and/or variable names label Sep 19, 2024
Copy link

@algorithms-keeper algorithms-keeper bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Click here to look at the relevant links ⬇️

🔗 Relevant Links

Repository:

Python:

Automated review generated by algorithms-keeper. If there's any problem regarding this review, please open an issue about it.

algorithms-keeper commands and options

algorithms-keeper actions can be triggered by commenting on this PR:

  • @algorithms-keeper review to trigger the checks for only added pull request files
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command will post all the messages in one comment.

NOTE: Commands are in beta and so this feature is restricted only to a member or owner of the organization.

data_structures/sliding_window/fixed_size_window.py Outdated Show resolved Hide resolved
@algorithms-keeper algorithms-keeper bot removed the require descriptive names This PR needs descriptive function and/or variable names label Sep 19, 2024
@tianyizheng02
Copy link
Contributor

Sorry, but we can't accept this PR because it's a how-to.

Your PR just uses imports all of the necessary NN functionality from TF. This repo is for educational purposes, and as such you need to provide your own implementation of your proposed algorithms. You did not implement the NNs yourself, and simply using TF to develop your models doesn't teach readers how a NN is actually implemented.

This was all stated in this repo's contributing guidelines, which you indicated that you have read:

As stated in the contributing guidelines:

Algorithms in this repo should not be how-to examples for existing Python packages. Instead, they should perform internal calculations or manipulations to convert input values into different output values. Those calculations or manipulations can use data types, classes, or functions of existing Python packages but each algorithm in this repo should add unique value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting reviews This PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants