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

Investigate all the Places that Involve Shape or Dimension Evaluation #11

Closed
DarrenZhang01 opened this issue Jul 23, 2020 · 1 comment
Closed
Assignees
Labels

Comments

@DarrenZhang01
Copy link
Owner

DarrenZhang01 commented Jul 23, 2020

Since the current shape Info for the Kernel object is stored inside an ndarray in the form like shape1 = ndarray<tf.Tensor([1024 2], shape=(2,), dtype=int64)>, there is currently error like #10, then there is possibility that there are chained problems caused by this shape evaluation that also leads to mis-evaluation on the dimensionality, etc. Shapes like ndarray<tf.Tensor([2], shape=(1,), dtype=int64)> looks more or less like a mistake caused by the nested eval, something like shape1.shape. Overall, need to investigate the places of shape evaluation and make revisions when necessary.

@DarrenZhang01 DarrenZhang01 added the bug Something isn't working label Jul 23, 2020
@DarrenZhang01 DarrenZhang01 self-assigned this Jul 23, 2020
DarrenZhang01 pushed a commit that referenced this issue Jul 25, 2020
1. #11;
2. #10;
3. #6

Root problem:
Although I have updated the returned shapes from `out_shape` to
`np.zeros(out_shape)` in `ntk_init_fn`, this only works for
non-activation layers in Neural Tangents like a standard Dense layer.
For activation layers like Relu, it is still calling the `elementwise`
function inside `tf_jax_stax`, where the output shape `input_shape`
should also be revised to `np.zeros(input_shape)` for `eval_on_shapes`
to be able to handle it.
@DarrenZhang01
Copy link
Owner Author

Solved in 98be634, together with issues google/neural-tangents#52, #10 and #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant