bug
一周三更
这个作者很懒,什么都没留下…
展开
-
git push 报错汇总
报错汇总:1.fatal: unable to access 'https://github.com/formoree/Machine-learing-based-on-tf.git/': OpenSSL SSL_read: Connection was reset, errno 100542.fatal: unable to access 'https://github.com/formoree/Machine-learing-based-on-tf.git/': Failed to connect原创 2021-08-11 20:52:41 · 626 阅读 · 0 评论 -
WARNING:tensorflow:The dtype of the target tensor must be floating
WARNING:tensorflow:The dtype of the target tensor must be floating (e.g. tf.float32) when calling GradientTape.gradient, got tf.int32报错代码如下:x = tf.random.normal([1,3])b = tf.ones([1])w = tf.ones([3,1])y = tf.constant([1])with tf.GradientTape() as ta原创 2021-08-09 17:15:15 · 602 阅读 · 0 评论 -
2021-08-08
报错:‘Dense’ object has no attribute ‘kernel’问题关键:没有调用dense函数,无法获取参数try: net = tf.keras.layers.Dense(10) net.kernel.shapeexcept Exception as e: print(e) # output:'Dense' object has no attribute 'kernel'正确使用方法:import tensorflow as tf#自动原创 2021-08-08 21:42:18 · 169 阅读 · 0 评论