【470】Keras API 参考说明

参考:Keras API reference


tf.keras.utils.to_categorical(y, num_classes=None, dtype="float32")

将向量或整数转为二进制矩阵,类似 one-hot 编码

numpy.random.randint(low, high=None, size=None, dtype=int)

返回指定范围内的随机整数,可以指定 shape/size

猜你喜欢

转载自www.cnblogs.com/alex-bn-lee/p/13161801.html