Could not find variable conv1/gdn_0/reparam_gamma
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python, tensorflow
调研方向
Start with the supplied my_model definition and reproduce the failure at model.fit using TensorFlow 2.8.0 and tensorflow-compression 2.8.0. Compare the model behavior with GDN removed or replaced, then inspect the GDN activation path and variable initialization. Done means the GDN-enabled model completes training without the missing reparam_gamma error.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
I am using tensorflow and tensorflow-compression to train a new model in keras. However, when the code runs to model.fit, the following error occurs:
Epoch 1/100
*** tensorflow.python.framework.errors_impl.FailedPreconditionError: 2 root error(s) found.
(0) FAILED_PRECONDITION: Could not find variable conv1/gdn_0/reparam_gamma. This could mean that the variable has been deleted. In TF1, it can
also mean the variable is uninitialized. Debug info: container=localhost, status error message=Resource localhost/conv1/gdn_0/reparam_gamma/N10tensorflow3VarE does not exist.
[[{{node conv1/gdn_0/gamma/lower_bound_1/ReadVariableOp}}]]
[[loss/mul/_97]]
(1) FAILED_PRECONDITION: Could not find variable conv1/gdn_0/reparam_gamma. This could mean that the variable has been deleted. In TF1, it can
also mean the variable is uninitialized. Debug info: container=localhost, status error message=Resource localhost/conv1/gdn_0/reparam_gamma/N10tensorflow3VarE does not exist.
[[{{node conv1/gdn_0/gamma/lower_bound_1/ReadVariableOp}}]]
0 successful operations.
0 derived errors ignored.
This is my model:
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import LeakyReLU
from tensorflow.keras.layers import Input
from tensorflow_compression import GDN
def my_model:
def __init__(self,input_shape,filter_num):
self.input_shape = input_shape
self.filter_num = filter_num
def create_model(self):
input = Input(shape=self.input_shape, name="input_1")
conv1 = Conv2D(filters=self.filter_num, kernel_size=3, padding="same", name="conv1", activation=GDN(name="gdn_0"))
x = conv1(input)
# layer_gdn = GDN(name="gdn_0")
# x = layer_gdn(x)
output = LeakyReLU(alpha=self.alpha, name="hidden_activation")(x)
model = Model(inputs=input, outputs=output)
if self.training:
opt = keras.optimizers.Adam()
model.compile(
optimizer=opt,
loss=MSELoss,
experimental_run_tf_function=False,
)
return model
Besides, if I remove the activation=GDN(name="gdn_0") or replace it with others, the training goes well, so maybe it is a bug.
What should I do to solve it?
Thanks.
System:
- OS: Ubuntu18.04
- Python version: 3.8, [anaconda install]
- TensorFlow version 2.8.0 [pip install]
- tensorflow-compression version 2.8.0
- 主要语言
- Python
- 星标
- 922
- 派生
- 257
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
tensorflow/compression 的其他 Issue
-
IGDN未关闭
难度 3/5 1-2 天 新手友好度 35/100
tensorflow/compression#192 ·
-
难度 4/5 3-5 天 新手友好度 25/100
tensorflow/compression#188 ·
-
安卓未关闭
难度 5/5 一周以上 新手友好度 10/100
tensorflow/compression#185 ·
-
难度 4/5 3-5 天 新手友好度 25/100
tensorflow/compression#179 · 4 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
tensorflow/compression#174 · 1 个 reaction ·
查看 tensorflow/compression 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
Deltares/imod-python#1940 ·
维护者通常 1 天内回复
-
effort: low prio: low ready
难度 1/5 1 小时以内 新手友好度 82/100
digitalfabrik/integreat-cms#4621 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
ioos/compliance-checker#1375 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复