tensorflow / tensorflow/probability

`tfp.distributions.MixtureSameFamily` dtype problem.

Open
#1,237 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
4.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

I was following a blogpost about variational inference when I got this error

InvalidArgumentError: cannot compute AddV2 as input #1(zero-based) was expected to be a int32 tensor but is a int64 tensor [Op:AddV2]

In the original post, he is using tfp=0.8.0-rc0 and tf=2.1.0 and it was working, I am using the tfp=0.12.1 with tf=2.4.1

Here a colab notebook to reproduce the problem.

I found the issue #1010 that seems related, but it was fixed on 0.12.1. So I think it is not the same problem.

Thx.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked Colab notebook with TensorFlow Probability 0.12.1 and TensorFlow 2.4.1, then compare the dtype failure with the behavior described for 0.8.0-rc0 and TensorFlow 2.1.0. Read issue #1010 for related context; done means MixtureSameFamily no longer produces the reported int32/int64 AddV2 error under the reproduced setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.