<p dir="auto">Hello, i'm trying to load my model using pytorch_java_only but it's return this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread &quot;main&quot; java.lang.UnsatisfiedLinkError: no pytorch_jni in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at com.facebook.soloader.nativeloader.SystemDelegate.loadLibrary(SystemDelegate.java:22)
	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:43)
	at org.pytorch.NativePeer.&lt;clinit&gt;(NativePeer.java:11)
	at org.pytorch.Module.load(Module.java:23)
	at com.github.beeqwe.Bootstrap.main(Bootstrap.java:18)"><pre class="notranslate"><code class="notranslate">Exception in thread "main" java.lang.UnsatisfiedLinkError: no pytorch_jni in java.library.path
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
	at java.lang.System.loadLibrary(System.java:1122)
	at com.facebook.soloader.nativeloader.SystemDelegate.loadLibrary(SystemDelegate.java:22)
	at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:43)
	at org.pytorch.NativePeer.&lt;clinit&gt;(NativePeer.java:11)
	at org.pytorch.Module.load(Module.java:23)
	at com.github.beeqwe.Bootstrap.main(Bootstrap.java:18)
</code></pre></div>
<p dir="auto">How to reproduce the bug:</p>
<p dir="auto">OS: <strong>Windows</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public static void main(String[] args) throws IOException {
    System.setProperty(&quot;java.library.path&quot;, LIBTORCH_PATH + &quot;lib&quot;);

    Module mod = Module.load(MODEL_PATH + &quot;model.pt1&quot;); //LINE 18
    Tensor data =
            Tensor.fromBlob(
                    new int[]{1, 2, 3, 4, 5, 6}, // data
                    new long[]{2, 3} // shape
            );
    IValue result = mod.forward(IValue.from(data), IValue.from(3.0));
    Tensor output = result.toTensor();

    System.out.println(&quot;shape: &quot; + Arrays.toString(output.shape()));
    System.out.println(&quot;data: &quot; + Arrays.toString(output.getDataAsFloatArray()));
}"><pre class="notranslate"><code class="notranslate">public static void main(String[] args) throws IOException {
    System.setProperty("java.library.path", LIBTORCH_PATH + "lib");

    Module mod = Module.load(MODEL_PATH + "model.pt1"); //LINE 18
    Tensor data =
            Tensor.fromBlob(
                    new int[]{1, 2, 3, 4, 5, 6}, // data
                    new long[]{2, 3} // shape
            );
    IValue result = mod.forward(IValue.from(data), IValue.from(3.0));
    Tensor output = result.toTensor();

    System.out.println("shape: " + Arrays.toString(output.shape()));
    System.out.println("data: " + Arrays.toString(output.getDataAsFloatArray()));
}
</code></pre></div>
<p dir="auto">pom.xml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;dependency&gt;
     &lt;groupId&gt;org.pytorch&lt;/groupId&gt;
      &lt;artifactId&gt;pytorch_java_only&lt;/artifactId&gt;
      &lt;version&gt;1.6.0&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.facebook.fbjni&lt;/groupId&gt;
    &lt;artifactId&gt;fbjni-java-only&lt;/artifactId&gt;
    &lt;version&gt;0.0.3&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.facebook.soloader&lt;/groupId&gt;
    &lt;artifactId&gt;nativeloader&lt;/artifactId&gt;
    &lt;version&gt;0.8.0&lt;/version&gt;
&lt;/dependency&gt;
"><pre class="notranslate"><code class="notranslate">&lt;dependency&gt;
     &lt;groupId&gt;org.pytorch&lt;/groupId&gt;
      &lt;artifactId&gt;pytorch_java_only&lt;/artifactId&gt;
      &lt;version&gt;1.6.0&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.facebook.fbjni&lt;/groupId&gt;
    &lt;artifactId&gt;fbjni-java-only&lt;/artifactId&gt;
    &lt;version&gt;0.0.3&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;com.facebook.soloader&lt;/groupId&gt;
    &lt;artifactId&gt;nativeloader&lt;/artifactId&gt;
    &lt;version&gt;0.8.0&lt;/version&gt;
&lt;/dependency&gt;

</code></pre></div>
<p dir="auto"><strong>LIBTORCH_PATH</strong> this is directory of files which downloaded from <a href="https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.6.0%2Bcpu.zip" rel="nofollow">there</a></p>
<p dir="auto">And i noticed one regularity, linux archive contains the libpytorch_jni.so file and macos archive contains the libpytorch_jni.dylib, but in windows archive no similar file. Same with libfbjni.so and libfbjni.dylib. Could you help me? Maybe i do something wrong.</p>
<p dir="auto">Thanks!</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/peterjc123/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/peterjc123">@peterjc123</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/maxluk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/maxluk">@maxluk</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nbcsm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nbcsm">@nbcsm</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/guyang3532/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/guyang3532">@guyang3532</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gunandrose4u/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gunandrose4u">@gunandrose4u</a> @smartcat2010 <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mszhanyi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mszhanyi">@mszhanyi</a></p>
<p dir="auto">I think pytorch should add Windows support.<br>
Other deep learning frameworks, like tensorflow, theano and mxnet, all support Windows.<br>
I only use Windows in my work. So I want to know whether pytorch will support Windows in future.</p>