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 new tests #430

Merged
merged 6 commits into from
Aug 2, 2023
Merged

Add new tests #430

merged 6 commits into from
Aug 2, 2023

Conversation

yygf123
Copy link
Contributor

@yygf123 yygf123 commented Jul 28, 2023

Environment

  • Python: 3.9
  • CPU: AMD Ryzen 7 4800H with Radeon Graphics
  • GPU: NVIDIA GeForce RTX 2060

Test Content

  • Create test_nvar.py to test nvar.py.
  • Create test_reservoir.py to test reservoir.py.
  • Create test_rnncells.py to test rnncells.py.
  • Create test_mode.py to test whether each dnn function supports TrainingMode, BatchingMode and NonBatchingMode.

Results

rnncells.py

  • Conv1dLSTMCell, Conv2dLSTMCell and Conv3dLSTMCell do not support NonBatchingMode.
  • Other functions all support TrainingMode, BatchingMode and NonBatchingMode.

reservoir.py

  • All the functions support TrainingMode, BatchingMode and NonBatchingMode.

conv.py

  • Conv1d, Conv2d, Conv3d, ConvTranspose1d, ConvTranspose2d, ConvTranspose3d do not support NonBatchingMode.
  • Other functions all support TrainingMode, BatchingMode and NonBatchingMode.

pooling.py

  • All the functions support TrainingMode, BatchingMode and NonBatchingMode.

dropout.py

  • All the functions support TrainingMode, BatchingMode and NonBatchingMode.

function.py

  • All the functions support TrainingMode, BatchingMode and NonBatchingMode.

linear.py

  • All the functions support TrainingMode, BatchingMode and NonBatchingMode.

normalization.py

  • BatchNorm1d, BatchNorm2d, BatchNorm3d do not support NonBatchingMode.
  • Other functions all support TrainingMode, BatchingMode and NonBatchingMode.

Copy link
Collaborator

@chaoming0625 chaoming0625 left a comment

Choose a reason for hiding this comment

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

Good work.

The test errors are caused by the ignore of adding bm.random.seed() before the test cases of RNNCell.

@chaoming0625
Copy link
Collaborator

Test error in Python 3.8:

image

@chaoming0625
Copy link
Collaborator

chaoming0625 commented Jul 29, 2023

Test errors on Python 3.9 - 3.11 are caused by the JAX compatible issue since the latest release of JAX removes the support of Array.split. I will fix this later.

@yygf123
Copy link
Contributor Author

yygf123 commented Aug 2, 2023

I have already update the tests. And the automatic actions have passed.

@chaoming0625 chaoming0625 merged commit 7d086d2 into brainpy:master Aug 2, 2023
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

Successfully merging this pull request may close these issues.

2 participants