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 no_grad #125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

add no_grad #125

wants to merge 1 commit into from

Conversation

ShawnXuan
Copy link
Collaborator

add no_grad to avoid RuntimeError: Can only set leaf tensor's data.

strip_optimizer(f) # strip optimizers
if f is best:
LOGGER.info(f"\nValidating {f}...")
results, _, _ = validate.run(
Copy link
Collaborator

Choose a reason for hiding this comment

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

= validate.run( 调用

image

@smart_inference_mode() 是个no_grad的装饰器

image

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