-
from tensorflow import keras.backend as K K.backend.shape(X) # 返回张量 可以看成列表,可以有下标
-
K.all(x, axis=None, keepdims=False) # AND操作,按照轴的选定
-
K.cast(x, dtype) # 改变数据类型,返回的是指定dtype的x
-
K.floatx() # 'float32'
-
# 一维张量(简单理解为数组) K.arange(start, stop=None, step=1, dtype='int32')
-
K.pow(x, a) # x的a次方
-
K.stack(x, axis=0) # x堆叠 可以传入列表,按照[-3, 3)传入轴
-
K.reshape(x, shape) # x 重塑成shape (元组)
-
K.sin() or K.cos()
-
# 一个张量,索引的整数张量,返回一个张量,它与reference具有相同的类型。 K.gather(refernce, indices)
-
K.concatenate(tensors, axis=-1) # 按轴连接张量列表
Keras API认识笔记
最新推荐文章于 2024-04-29 17:55:25 发布