解决AttributeError: module tensorflow_core.keras has no attribute Dense
tensorflow
一个面向所有人的开源机器学习框架
项目地址:https://gitcode.com/gh_mirrors/te/tensorflow

·
使用工具是jupyter notebook,按照视频中代码照敲竟然是错的,无语,使用tab键一步步打开方法选择问题才解决,终于找到Dense方法所在地,附上原代码和改正后代码:
model.add(tf.keras.Dense(10,activation = 'softmax'))
tensorflow
一个面向所有人的开源机器学习框架
项目地址:https://gitcode.com/gh_mirrors/te/tensorflow
改正后:
model.add(tf.keras.layers.Dense(10,activation = 'softmax'))




一个面向所有人的开源机器学习框架
最近提交(Master分支:1 个月前 )
4f64a3d5
Instead, check for this case in `ResolveUsers` and `ResolveOperand`, by querying whether the `fused_expression_root` is part of the `HloFusionAdaptor`.
This prevents us from stepping into nested fusions.
PiperOrigin-RevId: 724311958
1 个月前
aa7e952e
Fix a bug in handling negative strides, and add a test case that exposes it.
We can have negative strides that are not just -1, e.g. with a combining
reshape.
PiperOrigin-RevId: 724293790
1 个月前
更多推荐
相关推荐
查看更多
tensorflow

一个面向所有人的开源机器学习框架
tensorflow

TensorFlow for R
TensorFlow-Examples

TensorFlow Tutorial and Examples for Beginners (support TF v1 & v2)
所有评论(0)