config_utils.py 文件源码

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

项目:RNNVis 作者: myaooo 项目源码 文件源码
def get_dtype(dtype):
    """
    A helper function to get tf.dtype from str
    :param dtype: a str, e.g. "int32"
    :return: corresponding tf.dtype
    """
    assert isinstance(dtype, str)
    if dtype in __str2dtype:
        return __str2dtype[dtype]
    return tf.int32
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号