Giter Site home page Giter Site logo

Comments (14)

dreiss avatar dreiss commented on August 12, 2024 5

We had some issues with snapshot uploads that should be resolved now. I just downloaded this repo, made these changes, and was able to run ./gradlew assembleDebug in the PyTorchDemoApp directory. If you're still experiencing this, please let us know. And please try to reproduce by checking out a clean copy of the repository and making these changes locally before building, and make sure that you're in the right directory (PyTorchDemoApp vs HelloWorldApp).

diff --git i/PyTorchDemoApp/app/build.gradle w/PyTorchDemoApp/app/build.gradle
index c0226ed..8ca451e 100644
--- i/PyTorchDemoApp/app/build.gradle
+++ w/PyTorchDemoApp/app/build.gradle
@@ -2,6 +2,9 @@ apply plugin: 'com.android.application'
 
 repositories {
     jcenter()
+    maven {
+        url "https://oss.sonatype.org/content/repositories/snapshots"
+    }
 }
 
 android {
@@ -35,6 +38,6 @@ dependencies {
     implementation "androidx.camera:camera-camera2:$camerax_version"
     implementation 'com.google.android.material:material:1.0.0-beta01'
 
-    implementation 'org.pytorch:pytorch_android:1.3.0'
-    implementation 'org.pytorch:pytorch_android_torchvision:1.3.0'
+    implementation 'org.pytorch:pytorch_android:1.4.0-SNAPSHOT'
+    implementation 'org.pytorch:pytorch_android_torchvision:1.4.0-SNAPSHOT'
 }

from android-demo-app.

ljk53 avatar ljk53 commented on August 12, 2024 3

@junjuew my fixes were landed and available in 1.4-snapshot build. You can update your build.gradle to try 1.4-snapshot, like this: ljk53@443b524

Please let me know if it fixes your problem, thanks!

cc: @ZhangWen0301 @hmzjwhmzjw

from android-demo-app.

junjuew avatar junjuew commented on August 12, 2024 2

@ljk53 I reproduced this error using an open-sourced neural style transfer network from here. The original repo is a bit convoluted, so I created a simple repo here to demonstrate the problem. The DNN definition is here. The README.md shows the steps of tracing in python and loading successfully in C++. However, when using the saved model in the android app, the error mentioned above occurs.

from android-demo-app.

IsaacBerman avatar IsaacBerman commented on August 12, 2024 1

@ljk53 When I switch my dependencies to those found in the changes you linked "1.4.0-SNAPSHOT," i get the following errors "ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Failed to transform artifact 'pytorch_android.aar (org.pytorch:pytorch_android:1.4.0-SNAPSHOT:20191115.103440-37)' to match attributes {artifactType=jar}"

from android-demo-app.

ZhangWen0301 avatar ZhangWen0301 commented on August 12, 2024

same question

from android-demo-app.

hmzjwhmzjw avatar hmzjwhmzjw commented on August 12, 2024

same question

from android-demo-app.

ljk53 avatar ljk53 commented on August 12, 2024

@junjuew thanks for your feedback and it does look similar as #26764.
Are you able to repro this with some open source model? It would be helpful if I can read the model code and see what it does differently during model loading phase.

from android-demo-app.

ljk53 avatar ljk53 commented on August 12, 2024

@junjuew thanks for creating the easy repro steps. We are working on a fix now. I reopened #26764 and will keep updating there.

from android-demo-app.

junjuew avatar junjuew commented on August 12, 2024

@ljk53 It fixed my problem. Thank you. I'll go ahead and close this issue then.

from android-demo-app.

FilipJergleAlmquist avatar FilipJergleAlmquist commented on August 12, 2024

I also get those errors when using 1.4.0-SNAPSHOT.

from android-demo-app.

Joyako avatar Joyako commented on August 12, 2024

@ljk53 The first few weeks, my project is OK when I used the "1.4.0-SNAPSHOT", but now it go wrong.The error is same to @IsaacBerman .

from android-demo-app.

Joyako avatar Joyako commented on August 12, 2024

@IsaacBerman You find any method to solve your question, if you have solved it , please tell me, thanks.

from android-demo-app.

IsaacBerman avatar IsaacBerman commented on August 12, 2024

@Joyako No fix as of yet, will let you know if I find something.

from android-demo-app.

IsaacBerman avatar IsaacBerman commented on August 12, 2024

@Joyako A project clean fixed the "Unable to resolve dependency error," but the original error still stands for me.

from android-demo-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.