Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
从tensorflow 2.0 beta中的tf.data.Dataset检索下一个元素
在tensorflow 2 0 beta之前 要从tf data Dataset中检索第一个元素 我们可以使用迭代器 如下所示 usr bin python import tensorflow as tf train dataset tf
python
tensorflow
Iterator
tensorflowdatasets
tensorflow20
tf.data.Dataset 迭代器返回 Tensor("IteratorGetNext:1", shape=(None, 16), dtype=int32) 但无法获取张量的值
我正在尝试编写一个自定义模型 其中我正在编写一个自定义train step功能 我正在从自定义数据生成器创建 tf data Dataset 例如 tds tf data Dataset from generator tdg iter ar
tensorflow
Keras
tensorflow20
tensorflowdatasets
tfkeras
tf.print 什么时候才能真正按预期工作(即打印张量和变量的值)?
首先 我使用的是TensorFlow 2 0 我只关心这个版本或更高版本 而且我已经太关心这样一个只会产生头痛的软件了 The TensorFlow 文档 https www tensorflow org api docs python t
python
tensorflow
Keras
tensorflow20
AttributeError:该层从未被调用,因此没有定义的输入形状
我尝试通过创建三个类在 TensorFlow 2 0 中构建自动编码器 Encoder Decoder 和 AutoEncoder 由于我不想手动设置输入形状 因此我尝试从编码器的 input shape 推断解码器的输出形状 import
tensorflow
tfkeras
tensorflow20
在 jupyter 中找不到 Tensorboard 作为魔法函数
我想使用最新的tensorflow 2 0 0a0在jupyter中运行tensorboard 使用tensorboard版本1 13 1和python 3 6 using tensorboard logdir logs base dir
python
tensorflow
tensorflow20
tensorboard
tensorflow2x
如何在张量流中将TextVectorization保存到磁盘?
我已经训练了一个 TextVectorization 层 见下文 我想将其保存到磁盘 以便下次可以重新加载它 我努力了pickle and joblib dump 这是行不通的 from tensorflow keras layers ex
tensorflow
Keras
tensorflow20
pickle
未知层:当我尝试加载模型时 KerasLayer
当我尝试将模型另存为 hdf5 时 path path h5 model save path 然后再次加载模型 my reloaded model tf keras models load model path 我收到以下错误 ValueE
python
Keras
tensorflow20
如何使用 tf2 为 seq2seq 构建自定义双向编码器?
class Encoder tf keras Model def init self vocab size embedding dim enc units batch sz super Encoder self init self batc
recurrentneuralnetwork
tensorflow20
Encoder
Seq2Seq
如何在 Tensorflow 2.0 中使用嵌入投影仪
随着 tf contrib 模块从 Tensorflow 中消失 并且 tf train Saver 也消失 我无法找到一种方法来存储一组嵌入及其相应的缩略图 以便 Tensorboard Projector 可以读取它们 The 张量板文
python3x
tensorflow
tensorboard
tensorflow20
Keras 错误:调用 Predict_on_batch 时“优化循环失败:已取消:操作已取消”
我有一些使用 keras 的旧工作代码 我最近把它掸掉并尝试使用它 但使用的是当前版本的 keras tensorflow 调用 Predict on batch 时收到警告 错误 W tensorflow core data root d
tensorflow
Keras
tensorflow20
tfkeras
Tensorflow 2:如何在 GPU 和 CPU 之间切换执行?
In tensorflow1 X 独立keras2 X 中 我曾经使用以下代码片段在 GPU 上的训练和 CPU 上运行推理之间切换 由于某种原因 我的 RNN 模型速度要快得多 keras backend clear session de
python
GPU
tensorflow20
tfkeras
在本地机器上加载张量流模型
我已经在 google colab 中训练了我的 TensorFlow 模型 并将其导出为 h5 格式 在 google colab 中 我可以毫无问题地加载模型 但在我的本地计算机上 它会向我抛出错误和警告 装载模型 import ten
tensorflow
tensorflow20
TF2 对象检测 API:model_main_tf2.py - 验证丢失?
过去两个月我一直在尝试训练一个对象检测模型 并最终通过以下方法成功了tutorial https tensorflow object detection api tutorial readthedocs io en latest 这是我的c
python
tensorflow
tensorflow20
objectdetection
objectdetectionapi
张量流联合训练和评估期间的 MSE 误差不同
我正在联合张量流中实现回归模型 我从本教程中使用的 keras 简单模型开始 https www tensorflow org tutorials keras regression https www tensorflow org tuto
TensorFlow 和 Keras 入门:过去 (TF1) 现在 (TF2)
这个问题的目的是要求一个最基本的指南来帮助人们快速了解 TensorFlow 1 和 TensorFlow 2 我觉得没有一个连贯的指南来解释 TF1 和 TF2 之间的差异 并且 TF 已经通过了主要的研究修订和快速发展 当我说时供参考
python
tensorflow
machinelearning
Keras
tensorflow20
如何在 Tensorflow 2.0 中使用 K.get_session 或如何迁移它?
def init self kwargs self dict update self defaults set up default values self dict update kwargs and update with user o
machinelearning
Keras
deeplearning
Realtime
tensorflow20
计算两个模型的梯度
假设我们正在构建一个基本的 CNN 来识别猫和狗的图片 二元分类器 此类 CNN 的示例如下 model Sequential Conv2D 32 3 3 input shape Activation relu MaxPooling2D p
python
tensorflow
tensorflow20
backpropagation
使用 argmax 从 Tensor 获取值
我有一个Tensor形状的 60 128 30000 我想得到的值argmax of the 30000方面 axis 2 此代码是一个示例 tensor tf random uniform 60 128 30000 shape 60 12
python
tensorflow
tensorflow20
tensor
Keras 调整找不到回调
我正在使用 keras tuner 来获得适合我的模型的最佳超参数集 我可以为随机数据集重现我的问题 def generate data n windows n timesteps feature vector list label lis
python
tensorflow
Keras
tensorflow20
kerastuner
如何在tensorflow v2中启用cuda统一内存
In tensorflow1 x 有一个选项 例如use unified memory and per process gpu memory fraction这有可能触发 CUDA UVM 的使用 但这怎么能在tensorflow 2 0
python
tensorflow
tensorflow20
1
2
3
4
5
6
7
»