在一些tf. keras教程中,我看到他们像这样实例化了模型类:
model = tf.keras.Sequential()
而在某些地方,他们使用这样的东西:
model = tf.keras.Model(inputs=input, outputs=output)
但在文档中看到,它们确实看起来相同,但我不确定也没有明确提及。两者有何区别?
我正在通过关注官方 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)