graph.py 文件源码

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

项目:tensorboard-chainer 作者: neka-nat 项目源码 文件源码
def convert_dtype(dtype):
    if dtype == np.float32:
        return dt.DT_FLOAT
    elif dtype == np.float64:
        return dt.DT_DOUBLE
    elif dtype == np.int32:
        return dt.DT_INT32
    elif dtype == np.uint8:
        return dt.DT_UINT8
    elif dtype == np.int16:
        return dt.DT_INT16
    elif dtype == np.int8:
        return dt.DT_INT8
    elif dtype == np.dtype('S1'):
        return dt.DT_STRING
    else:
        raise ValueError('Unsupported type.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号