Tensorflow 中tf.string类型

本文详细介绍了TensorFlow中tf.string类型的特性及其官方定义,指出tf.string为变长字节数组,每个张量元素都是一个字节数组,并说明了tf.string类型不支持切片操作。

在使用tensorflow过程中,API返回值经常为tf.string类型,在此记录下官方对tf.tring的定义:

tf.string:Variable length byte arrays. Each element of a Tensor is a byte array。

tensoflow中的tf.string类型不可进行切片

System.EntryPointNotFoundException HResult=0x80131523 Message=Unable to find an entry point named 'TF_GetHandleShapeAndType' in DLL 'tensorflow'. Source=Tensorflow.Binding StackTrace: 在 Tensorflow.c_api.TF_GetHandleShapeAndType(SafeGraphHandle c_graph, TF_Output output) 在 Tensorflow.ops.get_resource_handle_data(Tensor graph_op) 在 Tensorflow.Operations.handle_data_util.get_resource_handle_data(Tensor graph_op) 在 Tensorflow.Eager.backprop_util._DTypeFromTensor(Tensor tensor) 在 Tensorflow.Eager.backprop_util.IsTrainable(Tensor tensor) 在 Tensorflow.Functions.TapeGradientFunctions.<>c.<.ctor>b__16_0(Tensor t) 在 System.Linq.Enumerable.WhereEnumerableIterator`1.GetCount(Boolean onlyIfCheap) 在 Tensorflow.Functions.TapeGradientFunctions..ctor(FuncGraph func_graph, Boolean need_gradients_for_jvps) 在 Tensorflow.Functions.DelayedRewriteGradientFunctions..ctor(FuncGraph func_graph, Dictionary`2 attrs) 在 Tensorflow.Functions.ConcreteFunction._set_infer_function() 在 Tensorflow.Functions.ConcreteFunction..ctor(Func`2 func, TF_DataType dtype) 在 Tensorflow.FlatMapDataset..ctor(IDatasetV2 input_dataset, Func`2 map_func) 在 Tensorflow.DatasetV2.flat_map(Func`2 map_func) 在 Tensorflow.Keras.Engine.DataAdapters.TensorLikeDataAdapter..ctor(DataAdapterArgs args) 在 Tensorflow.Keras.Engine.DataAdapters.DataHandler..ctor(DataHandlerArgs args) 在 Tensorflow.Keras.Engine.Model.evaluate(NDArray x, NDArray y, Int32 batch_size, Int32 verbose, NDArray sample_weight, Int32 steps, Int32 max_queue_size, Int32 workers, Boolean use_multiprocessing, Boolean return_dict, Boolean is_val) 在 Keras.NET_Prediction_main_program.Program.Main() 在 D:\编程软件系列\VS2022社区版\文件\Keras.NET Prediction main program\Program.cs 中: 第 254 行
最新发布
11-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值