Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to know which module exports a certain function

I was going through this Flux.jl tutorial and came across something called Chain.

m = Chain(Dense(10, 5, relu), Dense(5, 2), softmax)

It was not imported from any of the used modules and no namespace was used, so I did not know which module it belonged to. Although I managed to find that I belongs to Flux package, I wonder if there is a general way of figuring this out within the script.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

To figure out where a specific function comes from, you can use the parentmodule function:

julia> parentmodule(Chain)
Flux

Read more in the Julia docs: https://docs.julialang.org/en/v1/base/base/#Base.parentmodule

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading