fractalnet.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:keras-fractalnet 作者: snf 项目源码 文件源码
def tensorflow_categorical(count, seed):
    assert count > 0
    arr = [1.] + [.0 for _ in range(count-1)]
    return tf.random_shuffle(arr, seed)

# Returns a random array [x0, x1, ...xn] where one is 1 and the others
# are 0. Ex: [0, 0, 1, 0].
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号