tensorflow tf.encode_base64()(将字符串编码为网络安全的base64格式)
@tf_export('io.encode_base64', 'encode_base64')
@deprecated_endpoints('encode_base64')
def encode_base64(input, pad=False, name=None):r"""Encode strings into web-safe base64 format.将字符串编码为网络安全的base64格式。Refer to the following article for more information on base64 format:en.wikipedia.org/wiki/Base64. Base64 strings may have padding with '=' at theend so that the encoded has length multiple of 4. See Padding section of thelink above.有关base64格式的更多信息,请参考以下文章:zh.wikipedia.org/wiki/Base64。 Base64字符串的结尾可能带有'='填充,因此编码后的字符串的长度倍数为4。请参见上面链接的“填充”部分。Web-safe means that the encoder uses - and _ instead of + and /.Web安全意味着编码器使用-和_而不是+和/。Args:input: A `Tensor` of type `string`. Strings to be encoded.类型为string的Tensor。 需要被编码的字符串。pad: An optional `bool`. Defaults to `False`.Bool whether padding is applied at the ends.可选的`bool`。 默认为False。布尔型是否在两端使用填充。name: A name for the operation (optional). 操作的名称(可选)。Returns:A `Tensor` of type `string`. 类型为string的Tensor。"""_ctx = _context._contextif _ctx is None or not _ctx._eager_context.is_eager:if pad is None:pad = Falsepad = _execute.make_bool(pad, "pad")_, _, _op = _op_def_lib._apply_op_helper("EncodeBase64", input=input, pad=pad, name=name)_result = _op.outputs[:]_inputs_flat = _op.inputs_attrs = ("pad", _op.get_attr("pad"))_execute.record_gradient("EncodeBase64", _inputs_flat, _attrs, _result, name)_result, = _resultreturn _resultelse:try:_result = _pywrap_tensorflow.TFE_Py_FastPathExecute(_ctx._context_handle, _ctx._eager_context.device_name, "EncodeBase64",name, _ctx._post_execution_callbacks, input, "pad", pad)return _resultexcept _core._FallbackException:return encode_base64_eager_fallback(input, pad=pad, name=name, ctx=_ctx)except _core._NotOkStatusException as e:if name is not None:message = e.message + " name: " + nameelse:message = e.message_six.raise_from(_core._status_to_exception(e.code, message), None)
tensorflow tf.encode_base64()(将字符串编码为网络安全的base64格式)相关推荐
- 【Tensorflow】TF中的字符串tf.string
目录 string 的定义 string 类型常用的函数 tf.as_string() tf.substr() tf.string_to_number() tf.string_split() tf.s ...
- TensorFlow tf.data 导入数据(tf.data官方教程) * * * * *
原文链接:https://blog.csdn.net/u014061630/article/details/80728694 TensorFlow版本:1.10.0 > Guide > I ...
- 稀疏自编码器_基于tf实现稀疏自编码和在推荐中的应用
稀疏自编码 自编码器(Auto-Encoder)顾名思义,即可以利用自身的高阶特征编码自己.自编码器也是一种神经网络,他的输入和输出是一致的,他借助稀疏编码的思想,目标是使用稀疏的一些高阶特征重新组合 ...
- TensorFlow tf.keras.losses.SparseCategoricalCrossentropy 、 categorical_crossentropy
categorical_crossentropy VS. sparse_categorical_crossentropy 转载qq_42961707 最后发布于2019-07-13 22:10:12 ...
- 小程序 url 对象转字符串编码传参 url 字符串转对象解码接收参数
url 对象转字符串编码传参 let info = encodeURI(JSON.stringify(this.data.info));wx.navigateTo({url: '/pages/part ...
- tensorflow tf.keras.utils.plot_model 画深度学习神经网络拓扑图
tensorflow tf.keras.utils.plot_model 画网络拓扑图 # pip install graphviz # pip install pydot # 下载 graphviz ...
- String字符串编码解码格式
https://blog.csdn.net/qq_35241080/article/details/83001149 //2 如何识别字符串编码 public static String getEnc ...
- python中文字符串编码_浅谈python下含中文字符串正则表达式的编码问题
前言 Python文件默认的编码格式是ascii ,无法识别汉字,因为ascii码中没有中文. 所以py文件中要写中文字符时,一般在开头加 # -*- coding: utf-8 -*- 或者 #co ...
- Javascript对象的查询字符串编码
您是否知道将Javascript对象编码为可通过GET请求传递的string的快速简便的方法? 没有jQuery ,没有其他框架-仅是纯Javascript :) #1楼 如果要递归转换嵌套对象,并且 ...
最新文章
- 关于ie,火狐,谷歌浏览器滚动条的隐藏以及自定义样式
- MySQL笔记3:深入理解MySQL中的NULL
- 在移动端项目中使用vconsole
- LeetCode 31. 下一个排列(线性扫描)
- java处理unicode_C# JavaScript Java 与 中文 unicode 处理
- 教程 | 叮咚!答应你们的文件上传教程,到货了!
- c语言选题分析,c语言方面毕业设计选题.doc
- [UESTC SC T3] 蛋糕
- java 打印素数_Java 素数打印
- 3850x5服务器装系统,System x 3850 X5 系统安装测试报告
- android开发入门教程
- 校园一卡通管理信息系统的设计与实现(asp.net)
- 《视觉SLAM十四讲》读书笔记(四)
- 20230206 作业
- 程序员成长之路(Day 12)
- SQL中连接JOINS总结
- C语言字符串处理函数 strchr()和 strstr()的区别及使用
- Gstreamer 应用开发:1-基础介绍
- PC上网页端屏蔽知乎上的视频
- 分布式算力新时代下 看安超云ArSDN如何保障云边协同