tensorflow-gradient 相关问题


TensorFlow 默认使用多少个核心(不使用 Coordinator)?

我猜tensorflow默认使用单核(当我不使用“Coordinator”时),因为tensorflow是python库。 但是,当我在 Mac 上看到运行 Tensorflow 代码的活动监视器时


信息:为 CPU 创建 TensorFlow Lite XNNPACK 委托

信息:为 CPU 创建了 TensorFlow Lite XNNPACK 委托。 我在运行 OpenCV 程序时得到此输出。请提供解决此问题的方法。


如何使用 CSS conic-gradient 绘制重复的*水平*虚线?

我刚刚阅读了如何使用 css 渐变绘制垂直虚线和实线 但我不得不说,尽管一遍又一遍地阅读 MDN 文档,并阅读建议的代码,我还是没有任何了解...


在 Visual Studio Code conda 环境中安装后出现“ModuleNotFoundError:没有名为 'tensorflow' 的模块”

我正在寻求在 VSCode 内的 anaconda3 python 笔记本中将tensorflow与conda结合使用。 在 Windows 10 机器上的 anaconda 终端中,我使用了以下命令: conda create --name deeplear...


当我尝试将 model.predict() 与 Keras 顺序模型一起使用时,出现意外的 Tensorflow ResourceExhaustedError

我使用的是 Python 3.9,并且安装了 Tensorflow 2.10 和 CUDA Toolkit 11.2 和 cuDNN 8.2,因为这是 Windows 10 上原生支持的最后一个配置。 我正在使用 NVI 进行训练...


如何在python中为tensorflow中实现的模型创建混淆矩阵?

我正在使用 TensorFlow 在 Python 中训练模型,但我想打印模型预测数据的混淆矩阵(预测与实际)。我怎样才能做到这一点?到目前为止我的代码(不包括数据加载和


从 None 引发 core._status_to_exception(e) tensorflow.python.framework.errors_impl.InvalidArgumentError:

尝试按照本教程在 Citypersons 数据集上训练对象检测模型。 https://neptune.ai/blog/how-to-train-your-own-object- detector-using-tensorflow-object-detection-api 我...


为什么安装tensorflow时出现错误?

CondaError:下载的字节与内容长度网址不匹配:https://repo.anaconda.com/pkgs/main/win-64/cudatoolkit-11.3.1-h59b6b97_2.conda target_path:C:\ Users \ Rustem naconda3\pkg


尝试使用 keras.utils.get_file() 加载数据时出现错误

我在尝试使用 TensorFlow Keras 加载数据集时遇到错误。这是代码: dataset_url =“https://storage.googleapis.com/sample_org/sample_file.zip” data_dir = tf.keras...


仅选择张量第二个维度中的一个元素,将形状 (128, 10, 51) 的 TensorFlow 张量更改为形状 (128, 51) 的张量

我想通过仅选择张量第二个维度中的一个元素,将形状为 (128, 10, 51) 的 TensorFlow 张量更改为形状为 (128, 51) 的张量。我必须在 ndarray 中选择索引,例如 ...


如何对超过1类进行目标检测模型训练?

链接:https://github.com/tensorflow/models/blob/master/research/object_detection/colab_tutorials/eager_few_shot_od_training_tf2_colab.ipynb 我已经尝试过上面的 google colab 来训练对象检测...


Tensorflow 预处理将字符串分割为字符

我想编写使用 TextVectorization 预处理层,但将字符串拆分为字符。 数据 = tf.constant( [ “大脑比天空更广阔”, “因为把它们放在...


pip install tensorflow 对我不起作用

在 Windows 10 上的 VSCode 中使用新的 venv 并想要安装 matplotlib 和张量流 matplotlib 安装成功,但是张量流也没有尝试使用特定版本,但确实...


tensorflow 中的线程管理如何工作?

作为项目的一部分,我需要管理用张量流编写的 CNN 使用的线程数,从而避免并行化。阅读文档后,我无法理解前...


Dataflow Tensorflow Transform 将转换后的数据写入 BigQuery

在 GCP Dataflow 管道中,我尝试将转换组件中的转换数据写入 Bigquery 中,但出现以下错误。首先,如果有人能让我知道是否...


为什么我无法安装tensorflow?

我确定我使用的是3.6版本,并且我尝试了一切。 这是我尝试过的: py -m pip 安装张量流 错误:找不到满足张量流要求的版本(来自版本:...


tensorflow malloc 错误“释放的指针未分配”

我在尝试运行我的张量流代码时突然遇到此错误。以前工作得很好,但现在突然出现这个错误。谷歌搜索后,只有一个男人......


如何让tensorflow keras使用我的GPU?

我正在尝试在张量流中使用keras来训练CNN网络以进行某些图像分类。显然,在我的 CPU 上运行的训练非常慢,所以我需要使用我的 GPU 来进行训练......


AWS SageMaker 端点:调用 boto3.client("s3") 时出现超出最大递归深度错误

当我尝试在已部署的 SageMaker 端点(对于 TensorFlow 模型)上调用 .predict() 时,遇到最大递归深度超出错误。我已将日志语句放入推理脚本中,


tensorflow:无法加载动态库“cudnn64_8.dll”; dlerror:找不到 cudnn64_8.dll

当我运行我的程序时,我看到这个错误: 我有 CUDA 11 并且 bin 文件夹中没有这样的 dll 文件: 我用: Python 3.8.7 CUDA 11.0 张量流2.4.1 此页面上有信息 https://www.


由于“tf.shape”和“Tensor.shape”,我的代码出现问题。 `tf.shape` 和 `Tensor.shape` 都不起作用

我已经在 Tensorflow 中从头开始编写 DETR 对象检测管道。 DETR:Kaggle Notebook 链接:包含所有代码;制作您自己的笔记本副本以重现该问题 我已经测试过...


使用 TensorFlow 进行神经网络训练期间,损失飙升至 nan

我正在尝试训练一个简单的神经网络模型来对图像是否是叉子图片进行分类。我有 400 张图片,它们都很简单,即工具在一张空白页上。所以我就是


Tensorflow 模型在特定范围内正确,但在休息时错误

我正在使用tensorflow.keras制作一个简单的神经网络来预测sin函数。但该模型在 -15 到 15 范围内是正确的,但在其余部分上是错误的。 这是我的脚本: 将张量流导入为 tf...


.NET MAUI 中的 Shell 背景渐变

知道如何为 Shell 提供渐变背景吗? 我尝试在 Shell 背景上定义 LinearGradientBrush 但这不起作用。 知道如何为 Shell 提供渐变背景吗? 我尝试在 Shell 背景上定义 LinearGradientBrush,但这不起作用。 <?xml version="1.0" encoding="UTF-8" ?> <Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"> <Shell.Background> <LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> <GradientStop Color="Yellow" Offset="0.0" /> <GradientStop Color="Red" Offset="0.25" /> <GradientStop Color="Blue" Offset="0.75" /> <GradientStop Color="LimeGreen" Offset="1.0" /> </LinearGradientBrush> </Shell.Background> <FlyoutItem FlyoutDisplayOptions="AsMultipleItems"> <!-- FlyoutItem contents here --> </FlyoutItem> </Shell> 我已经确认这是为 Shell.Background 设置渐变时的已知问题,请参阅 Shell.Background - Gradient does not work #10445,您可以按照该线程进行操作。 幸运的是,您可以单独设置渐变背景。如果您有“外壳”弹出窗口,则可以为“外壳”弹出项目设置渐变背景: <Shell.FlyoutBackground> <LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> <GradientStop Color="Yellow" Offset="0.0" /> <GradientStop Color="Red" Offset="0.25" /> <GradientStop Color="Blue" Offset="0.75" /> <GradientStop Color="LimeGreen" Offset="1.0" /> </LinearGradientBrush> </Shell.FlyoutBackground> 另外,如果要将 ShellContent 背景设置为渐变背景,可以将渐变背景添加到 ContentPage 的背景属性中。 <ContentPage.Background> <LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> <GradientStop Color="Yellow" Offset="0.0" /> <GradientStop Color="Red" Offset="0.25" /> <GradientStop Color="Blue" Offset="0.75" /> <GradientStop Color="LimeGreen" Offset="1.0" /> </LinearGradientBrush> </ContentPage.Background> 希望这有帮助!


带有边框半径和粘性标题的 HTML 表格

我有一个 HTML ,带有边框半径和使用位置的粘性标题:sticky,如下所示: https://codepen.io/muhammadrehansaeed/pen/OJpeeKP 但是,当使用 滚动时 我有一个带有 <table> 的 HTML border-radius 和使用 position: sticky 的粘性标题,如下所示: https://codepen.io/muhammadrehansaeed/pen/OJpeeKP 但是,当使用粘性标题滚动时,表格行会伸出粘性标题的圆角所在的位置。请参阅此图片的左上角: 有没有办法可以在使用粘性标题向下滚动时保持圆角,或者在标题变得粘性并从原始位置向下移动时删除粘性标题?理想情况下,我想要一个CSS解决方案。 您可以使用伪元素隐藏边框的某些部分: table thead th:first-child::before, table thead th:last-child::after { width: 1px; height: 5px; background: white; content: ""; display: block; position: absolute; top: 0px; } table thead th:first-child::before { left: -1px; } table thead th:last-child::after { right: -1px; } 正如Ivan建议的那样,似乎使用伪元素来覆盖标题下方不需要的边框是(令人惊讶的)唯一可行的选择。我建议使用伪不仅用于覆盖“外部”区域,而且还用于绘制弧线和填充“内部”区域。可以使用堆叠背景来做到这一点。应用于原始代码: /* § Additions / Changes */ table thead th { position: relative; } /* Pseudos exceeding header boundary by border width; with rectangle covering half circle and rest of height */ table thead th:last-child::after, table thead th:first-child::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(-1 * var(--global-border-width-1)); width: var(--global-border-radius); background-image: linear-gradient(to bottom, transparent var(--global-border-radius), var(--global-title-color) 0), radial-gradient(circle at var(--global-border-radius) var(--global-border-radius), var(--global-title-color) var(--global-border-radius), var(--global-content-background-color) 0); background-position: top left; background-size: var(--global-border-diameter) 100%, var(--global-border-diameter) var(--global-border-diameter); background-repeat: no-repeat; } table thead th:last-child::after { left: auto; right: calc(-1 * var(--global-border-width-1)); background-position: top right; } /* § Declarations and original style */ html { --global-content-background-color: white; --global-title-color: black; --global-background-color: lightblue; --global-border-color: black; --global-border-radius: 20px; --global-border-width-1: 10px; --global-space-fixed-2: 10px; --global-space-fixed-3: 15px; --global-border-diameter: calc(2 * var(--global-border-radius)); background-color: var(--global-content-background-color); } table { color: var(--global-title-color); background-color: var(--global-content-background-color); border-collapse: separate; border-color: var(--global-title-color); border-style: solid; border-radius: var(--global-border-radius); border-width: 0 var(--global-border-width-1) var(--global-border-width-1) var(--global-border-width-1); border-spacing: 0; width: 100%; } table thead { position: sticky; top: 0; z-index: 10; } table thead th { color: var(--global-background-color); background-color: var(--global-title-color); padding: var(--global-space-fixed-2) var(--global-space-fixed-3); vertical-align: bottom; } table tbody td { border-top: var(--global-border-width-1) solid var(--global-border-color); padding: var(--global-space-fixed-2) var(--global-space-fixed-3); vertical-align: top; } table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--global-border-radius); } table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--global-border-radius); } /* § Unrelated / demo */ * { scroll-margin-top: calc(var(--global-space-fixed-2) * 4 + 1rem); /* = height of sticky thead + top padding of cell, provided text in thead does not wrap */ scroll-margin-bottom: 1em; } td { height: 60vh; } td a { float: right } tr:last-child td { vertical-align: bottom; } a[name]:empty::before { content: attr(name); } th:not(#\0):hover::before { background-image: linear-gradient(to bottom, transparent var(--global-border-radius), #0F08 0), radial-gradient(circle at center, #00F8 var(--global-border-radius), #F2F4 0); background-position: top left; background-size: var(--global-border-diameter) 100%, var(--global-border-diameter) var(--global-border-diameter); } <table> <thead> <tr> <th>Fake non-transparent "border-radius"</th> </tr> </thead> <tbody> <tr> <td> <a href="#⬆️" name="⬇️"></a> For fixed header</td> </tr> <tr> <td> <a href="#⬇️" name="⬆️"></a> Using CSS stacked background images in pseudo elements</td> </tr> </tbody> </table> 只需从表格中删除边框,并为表格主体中的第一个和最后一个表格单元格添加左右边框: tbody td:first-child { border-left: 1px solid black; } tbody td:last-child { border-right: 1px solid black; } tbody tr:last-child td{ border-bottom: 1px solid black; } tbody tr:last-child td:first-child { border-bottom-left-radius: 2px; } tbody tr:last-child td:last-child { border-bottom-right-radius: 2px; } 当然是使用适当的缩进、嵌套和变量! 使用许多伪选择器看起来样式相当丑陋,但似乎可以解决您的问题。 有一个更紧凑的解决方案。只需将具有背景颜色的框阴影添加到第一个 < th > 和最后一个 < th > 即可隐藏元素。 在此示例中,在右侧,您可以看到表格行由于边框半径而可见。在左边,我应用了盒子阴影。 盒子阴影:0 -2.1rem 0 .6rem #E5E7EB; 在这里,它是灰色的,以便您可以看到它的工作原理,但您只需使用与背景相同的颜色即可使其完全不可见。 这是最终结果以及我正在使用的代码: th:第一个孩子 { 边界半径:0.75rem 0 0 0; 左边框:.1rem 实心 $color-gray-200; 框阴影:0 -2.1rem 0 .6rem $color-gray-200; } th:最后一个孩子{ 边界半径:0 0.75rem 0 0; 右边框:.1rem 实心 $color-gray-200; 盒子阴影:1rem -2.1rem 0 .6rem $颜色白色; } 可能需要调整框阴影以隐藏基于所选边框半径的行。 不确定你是否熟悉jquery,如果熟悉的话你可以在滚动内容时动态更改 border-top-left-radius: 等于粘性标题的半径,但这对于新手来说有点棘手jquery/JS。 其次,您可以将粘性标题封闭到父级(例如class="parent")),并将父级背景设置为白色,没有边框。并保持粘性标题的边框半径不变。因此,当您滚动内容时将位于该父级下方(例如 class="parent")。为了确保父级出现在该行上方,您可以给出 z-index: 10


conda错误ssl证书:HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443

无论我做什么,我都会收到此错误 C:\Users\MyPc>conda update --all 解决环境:失败 CondaHTTPError:URL 的 HTTP 000 连接失败 无论我做什么,我都会收到此错误 C:\Users\MyPc>conda update --all Solving environment: failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/free/win-64/repodata.json.bz2> Elapsed: - An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way. If your current network has https://www.anaconda.com blocked, please file a support request with your network engineering team. SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/free/win-64/repodata.json.bz2 (Caused by SSLError("Can\'t connect to HTTPS URL because the SSL module is not available."))')) 我已经搜索了所有互联网,重新安装了 anaconda 并做了建议中的任何操作,但这个问题仍然存在。 Windows 10 C:\Users\MyPc>anaconda --version anaconda 命令行客户端(版本 1.7.2) C:\Users\MyPc>conda --version 康达 4.5.12 就我而言,当我尝试运行此命令时,我收到了此类错误消息 conda install tensorflow 这是错误消息 CondaSSLError:OpenSSL 似乎在此计算机上不可用。下载并安装软件包需要 OpenSSL。 异常:HTTPSConnectionPool(主机='repo.anaconda.com',端口=443):超过最大重试次数,网址:/pkgs/main/win-64/current_repodata.json(由SSLError(“无法连接到HTTPS URL”)引起因为 SSL 模块不可用。")) 这就是解决方案 步骤01 进入你的anaconda3的安装路径 步骤02 现在转到此文件路径 anaconda3\Library\bin 步骤03 现在选择这个 DLL 文件并复制它 libcrypto-1_1-x64.dll libssl-1_1-x64.dll 步骤04 之后转到此文件路径并将其粘贴到该文件夹内部 anaconda3\DLLs 这个命令对我有用: conda config --set ssl_verify false 我也遇到了同样的问题,解决这个问题的方法是安装早期的 32 位版本的 Conda。由于某种原因,较新的 64 位版本似乎容易出现此错误。您可以在这里找到 Conda 的早期版本: https://repo.continuum.io/archive/ 您应该搜索仅具有 x86 而不是 x86_64 的 Anaconda3 版本。 我也遇到了同样的问题,简单的解决方案是: 从开始菜单打开anaconda navigator,然后运行CMD.exe提示符,然后从那里安装,就是这样。 在 C:\Users\xyz 目录中创建一个名为 .condarc 的文件,其中包含以下内容 频道: 默认值 ssl_verify:假 然后尝试创建虚拟环境: conda create -n envname python=x.x anaconda 祝你好运!


© www.soinside.com 2019 - 2024. All rights reserved.