小编nee*_*l g的帖子

tf.keras.model 和 tf.keras.sequential 之间有什么区别?

在一些tf. keras教程中,我看到他们像这样实例化了模型类:

model = tf.keras.Sequential()

而在某些地方,他们使用这样的东西:

model = tf.keras.Model(inputs=input, outputs=output)

但在文档中看到,它们确实看起来相同,但我不确定也没有明确提及。两者有何区别?

python keras tensorflow

12
推荐指数
1
解决办法
8704
查看次数

断言错误:某些对象具有未恢复的属性

我正在通过关注官方 TensorFlow 网站此处 来训练关于文本预测的基本 LSTM 。我设法在 GTX 1050ti 上训练我的模型多达 40 个时期,并将 checkPoint 文件保存在一个单独的文件夹中。但是,当我现在尝试恢复模型时,出现了这个长错误:-

StreamExecutor device (0): GeForce GTX 1050 Ti, Compute Capability 6.1
WARNING:tensorflow:Entity <function standard_gru at 0x7f9e121324d0> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting <function standard_gru at 0x7f9e121324d0>: AttributeError: module 'gast' has no attribute 'Num'
WARNING:tensorflow:Entity <function cudnn_gru …
Run Code Online (Sandbox Code Playgroud)

text-processing python-3.x keras tensorflow

4
推荐指数
1
解决办法
2461
查看次数

标签 统计

keras ×2

tensorflow ×2

python ×1

python-3.x ×1

text-processing ×1