keras 使用经验

时间:2021-02-01 12:57:07   收藏:0   阅读:0
  1. tensorflow.keras与keras:TypeError: objectof type ‘xxx‘ has no len()
  2. Module ‘gast‘ has no attribute ‘Num‘
  3. K.batch_dot 的版本变化
random_order = list(range(len(total_data)))  # range 返回的结果需要用list
np.random.shuffle(random_order)
  1. TypeError: Using a tf.Tensor as a Python bool is not allowed.: v_in_dim = input_shape[2][-1].value 不加value,是一个 <class ‘tensorflow.python.framework.tensor_shape.Dimension‘> 类型的变量,需要加.value
import tensorflow as tf
from keras import backend as K
K.arange(K.shape(K.constant([1]))[0])

keras.backend.arange does not allow tensor start,要么使用keras,要么使用tf.range

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!