<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cupy on 111qqz's blog</title><link>https://111qqz.com/en/tags/cupy/</link><description>Recent content in Cupy on 111qqz's blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2015-2026 111qqz</copyright><lastBuildDate>Sun, 17 Dec 2023 18:22:24 +0800</lastBuildDate><atom:link href="https://111qqz.com/en/tags/cupy/index.xml" rel="self" type="application/rss+xml"/><item><title>[施工中] cupy与torch的导入顺序不同对计算结果的影响</title><link>https://111qqz.com/en/post/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0/2023-12-17-cupy-torch-import-order-impact/</link><pubDate>Sun, 17 Dec 2023 18:22:24 +0800</pubDate><guid>https://111qqz.com/en/post/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0/2023-12-17-cupy-torch-import-order-impact/</guid><description>&lt;h2 class="relative group"&gt;背景
 &lt;div id="背景" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#%e8%83%8c%e6%99%af" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;公司内部的基于torch的toolbox发现某个版本之后,结果发生了偏移. 通过一系列排查,发现当导入cupy和torch的顺序不同时，计算结果会有所差异。
也就是说,如下两段代码会导致模型训练等环节的计算得到不同的结果.&lt;/p&gt;</description></item></channel></rss>