Giter Club home page Giter Club logo

Comments (7)

lostmsu avatar lostmsu commented on August 24, 2024

@SnowSnakz this looks like a problem with environment configuration. I suggest to add

GradientSetup.EnsureInitialized();

after GradientEngine.UseEnvironmentFromVariable(); in CharRNNProgram.cs. It should give more meaningful exception.

P.S. it would be easier to help if you can provide the stack trace for the inner exception too (e.g. for the ArgumentNullException).

from gradient-samples.

lostmsu avatar lostmsu commented on August 24, 2024

@SnowSnakz actually, I think the unclear error has been fixed in the upcoming RC0.

You need Python 3.4+ (3.7 recommended) installed with TensorFlow 1.15.0. See instructions.

Alternatively, you can reference prepackaged TensorFlow from NuGet: LostTech.TensorFlow.Python. Disadvantage is that then every TensorFlow project deploys its own runtime, so launching every sample will consume ~1GB of disk space. This is the approach RL-MLAgents sample takes: relevant code.

from gradient-samples.

SnowSnakz avatar SnowSnakz commented on August 24, 2024

@lostmsu I am using Python 3.6 with tensorflow==1.15 installed.
I will try running the sample with GradientSetup.EnsureInitialized();

from gradient-samples.

SnowSnakz avatar SnowSnakz commented on August 24, 2024

image
I am getting the same error, no further details...

System.ArgumentNullException
  HResult=0x80004003
  Message=Value cannot be null.
Parameter name: source
  Source=Gradient.Runtime
  StackTrace:
   at Gradient.Tools.OnlyOneOrDefault[T](IEnumerable`1 source)
   at Gradient.GradientEngine.GetEnvironment()
   at Gradient.GradientEngine.Initialize()
   at Gradient.GradientEngine.EnsureInitialized()
   at CharRNN.CharRNNProgram.Main(String[] args) in C:\Users\SnowSnakz\Downloads\Gradient-Samples-master\Gradient-Samples-master\CharRNN\CharRNNProgram.cs:line 23

from gradient-samples.

SnowSnakz avatar SnowSnakz commented on August 24, 2024

Ah, I see that I used GradientEngine rather than GradientSetup...
If I use GradientSetup, it starts working

This trial version of Gradient will expire in 98 days on Friday, September 25, 2020
using Python: 3.6-X64 at C:\Users\SnowSnakz\AppData\Local\Programs\Python\Python36\
reading text file

and it continues fine

from gradient-samples.

lostmsu avatar lostmsu commented on August 24, 2024

@SnowSnakz yeah, one of them will have to go or be named better. The GradientEngine is a lower-level thing, that does not care about presence or lack of TensorFlow, it just picks the Python interpreter with the highest version number. In your case it probably picks something, that does not have TensorFlow in it.

from gradient-samples.

lostmsu avatar lostmsu commented on August 24, 2024

Created an issue for Gradient to clear this confusion: losttech/Gradient#31

from gradient-samples.

Related Issues (5)

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.