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

Update example #1404

Closed
wants to merge 0 commits into from
Closed

Update example #1404

wants to merge 0 commits into from

Conversation

supercgor
Copy link
Contributor

For some example, reduce the training function and testing function because it used up lots of memories.

@lululxvi
Copy link
Owner

For some example, reduce the training function and testing function because it used up lots of memories.

How much memory? All the examples can run well with tensorflow backend without memory issues.

@supercgor
Copy link
Contributor Author

if the number of functions is about 1000, 4GB memory is not enough for pytorch.
the problem only happens in non-cartesian products.

@lululxvi
Copy link
Owner

4GB memory is small. Use the original number.

return tf.concat(
[tf.math.cos(x), tf.math.sin(x), tf.math.cos(2 * x), tf.math.sin(2 * x), t], 1
x = 2 * np.pi * x
return bkd.concat(
Copy link
Owner

Choose a reason for hiding this comment

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

Don't use bkd. See other examples how to handle different backends.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

May I ask why you don't recommend using bkd? I saw other examples using if to switch the cases, but the codes are so redundant.

Copy link
Owner

Choose a reason for hiding this comment

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

bkd is only designed for internal use.

@supercgor supercgor closed this Aug 17, 2023
@supercgor supercgor deleted the testing_example branch August 18, 2023 03:07
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