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

Export data as well? #457

Closed
Roger-luo opened this issue Oct 23, 2018 · 4 comments
Closed

Export data as well? #457

Roger-luo opened this issue Oct 23, 2018 · 4 comments

Comments

@Roger-luo
Copy link
Contributor

data(x) = x

I notice the custom gradient part's example (http://fluxml.ai/Flux.jl/stable/internals/tracker.html#Custom-Gradients-1) directly use data but didn't import it. This can be confusing, and I guess it would be convenient to export it directly?

@johnnychen94
Copy link
Contributor

For Flux-only users it might be convenient, but export it would introduce some misunderstanding of the function.

For example, what does data mean in more general codes? To explain what data mean you then need to explain what a Tracker has...

Perhaps what we need is not export data, but a more useful tool, e.g., getdata(c::Chain, idxs...)(Roughly speaking)

@Roger-luo
Copy link
Contributor Author

I mean to export the data in Tracker, rather than Flux. And you can always use import to solve the problem. It's not a big deal. But this is causing the example in doc to have error.

@Roger-luo
Copy link
Contributor Author

And I don't see any difference by changing a function name. This does not solve name conflict.

@MikeInnes
Copy link
Member

I think we should probably just fix the docs here. data is a bit to generic to export.

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

4 participants