Skip to content

Question on abstract_eval_fun #3737

Answered by apaszke
DarrenZhang01 asked this question in General
Discussion options

You must be logged in to vote

@DarrenZhang01 Even though all inputs to a partially evaluated function might be unknown, it does not imply that all outputs are unknown, because some of those outputs might not have any dependency on the inputs! A simple example would be a function like this one:

def f(x):
  return x * 2, jnp.ones((10,))

In this case, running abstract_eval_fun on f would produce one ShapedArray eval for x * 2 and one ConcreteArray aval for the jnp.ones result.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@DarrenZhang01
Comment options

Answer selected by DarrenZhang01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3737 on July 14, 2020 18:11.