tensorflow_probability: bfgs_minimize requires the elements in initial_position to have the same shape
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python, tensorflow
调研方向
从 tensorflow_probability/python/optimizer/bfgs.py 第 210 行开始,使用 initial_position = [0., tf.zeros(10)] 重现该故障。跟踪 bfgs_minimize 如何组合初始值,并确定对于形状不同的元素应有的行为。当此输入不再引发报告的 shape-mismatch 错误时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
This line:
https://github.com/tensorflow/probability/blob/main/tensorflow_probability/python/optimizer/bfgs.py#L210
fails for input of the form:
initial_position = [0., tf.zeros(10)]
I am working through some simple toy examples and have a JointDistribution of the form:
def make_joint_dist(matrix):
def joint_dist():
intercept = yield tfd.Normal(loc=0.0, scale=1.0, name="intercept")
coefficients = yield tfd.Normal(loc=tf.zeros(10), scale=1.0, name="coefficients")
yield tfd.Normal(
loc=intercept + tfl.matvec(matrix, coefficients),
scale=1.0,
name="observations",
)
return tfd.JointDistributionCoroutineAutoBatched(joint_dist)
I am trying to run bfgs_minimize to find the MAP (minimize -joint_dist.log_prob(params)). However, in this case, I am cannot figure out how to pass an input_position for the coefficients. The code fails at L210 above:
Shapes of all inputs must match: values[0].shape = [] != values[1].shape = [10]
I can put together a running example colab, but wanted to kick this off while I clean up my notebook....
- 主要语言
- Jupyter Notebook
- 星标
- 4.4k
- 派生
- 1.1k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tensorflow/probability 的其他 Issue
-
KL divergence between two `TransformedDistribution`s with a shared non-injective bijector (`AbsoluteValue`) returns the base KL可能已有人在做 @Andreas-Hum 于 8 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
tensorflow/probability#2036 ·
-
难度 3/5 1-2 天 新手友好度 68/100
tensorflow/probability#2034 ·
-
难度 5/5 一周以上 新手友好度 35/100
tensorflow/probability#2021 ·
-
难度 4/5 3-5 天 新手友好度 30/100
tensorflow/probability#2015 ·
-
难度 3/5 1-2 天 新手友好度 48/100
tensorflow/probability#2013 ·
查看 tensorflow/probability 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
vllm-project/vllm-ascend#21392 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
type:epic-wave
难度 2/5 1-3 小时 新手友好度 75/100
jejjohnson/filterax#204 ·
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 88/100
selimfirat/pysad#644 ·
维护者通常 1 天内回复