Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Karl Lessard
    @karllessard
    also @ninjabem did you tried with the latest snapshot (0.4.0-SNAPSHOT)? It has tensorflow/java@709f570 that is related to string tensor deallocation, I’ll be curious to see if that could improve your situation as well.
    Ben Roberson
    @ninjabem
    @karllessard I haven't tried with 0.4.0-SNAPSHOT but I'm happy to give it a go
    Samuel Audet
    @saudet
    @karllessard Normal C functions don't return objects with deallocators since there's no standard way to deallocate memory from random pointers.
    The log will tell us to what kind of Pointer they are attached to though, so if @ninjabem can let us know what those are, it could help.
    Ben Roberson
    @ninjabem
    I'm deploying a canary with 0.3.2 + org.bytedeco.javacpp.logger.debug=true right now and will do the same with 0.4.0-SNAPSHOT in a bit.
    Aish
    @aishfenton
    We're calling SavedModelBundle.exporter("/data/").withSession(sess).withSignature(mySig).export to save a model. It seems to save out fine (according to the cli tool). But when we're loading it from the Python side using tf.saved_model.load("/data/"), we're getting the following error in ValueError: Feeds must be tensors. Any ideas ?
    Assume it's probably something silly we're doing
    Adam Pocock
    @Craigacp
    What's the rest of the python stack trace look like?
    Karl Lessard
    @karllessard
    I have a feeling that the list of inputs your are passing to your signature is probably not what TF is expecting, can you share more details in what mySig consist of?
    Aish
    @aishfenton
    [ btw, would you prefer me to move this to the Discuss site instead ? ]
    Adam Pocock
    @Craigacp
    The TF community managers would like us to start migrating conversations there as it's more searchable.
    It's also a little easier to operate on code snippets, as the gitter mobile client (at least on Android) is pretty poor at formatting (and threading for that matter).
    But it's up to you.
    Aish
    @aishfenton
    Makes sense. Moved them to there :)
    Adam Pocock
    @Craigacp
    :+1:
    Aish
    @aishfenton
    I think I have to have the message "approved" for it to show up. Will add stacktrace + sig under that
    Adam Pocock
    @Craigacp
    Ok, we should be able to do that for you, do you have a link?
    There's a little bit a of a bump at first to prevent easy spam attacks, but after the first couple of posts all that stuff should go away.
    Aish
    @aishfenton
    No, once I posted the message it disappeared into the ether. I assume someone on the admin side has to click approve, or something
    Adam Pocock
    @Craigacp
    Ok. Karl & I have some level of privileges as SIG leads, but the admins have more so they might have to click ok first.
    ^ discussion moved here
    Adam Pocock
    @Craigacp
    Cool, thanks.
    Sriram Kumar R
    @SRIRAMKARPAGAM
    Is there an easy way to create custom operations in Tensorflow java binding? Like being able to convert a custom java method as a tensor flow operation
    Karl Lessard
    @karllessard
    Hi @SRIRAMKARPAGAM , sorry for the delay, actually there are endpoints available for registering a Java kernel to TensorFlow but it is not being wrapped in TF Java yet nor anyone has tried it so far. I don’t know what kind of performances to expect with this setup.
    So to the question “is there an easy way”, I would say “no” but is there a way, I would say “maybe”. Here’s a starting point for investigating in that direction in case you are interested.
    Jakob Sultan Ericsson
    @jakeri
    I might have asked this before. :-)
    Do you have a release schedule?
    We are interested to know when there will be a TF Java release of TF 2.5.
    Adam Pocock
    @Craigacp
    I think we're going to skip straight to TF 2.6.0. we ran through the list of things to merge before 0.4.0 at the last meeting and it's relatively short.
    Jakob Sultan Ericsson
    @jakeri
    That also sounds good. :)
    raftaa
    @raftaa
    hi, one question concerning restricting GPU performance of TF: In Python we managed to restrict the GPU memory of our TF process to a certain amount of the GPU menory with: " tf.config.set_logical_device_configuration(gpu, [tf.config.LogicalDeviceConfiguration(memory_limit=8192)])". In Java we tried to use setPerProcessGpuMemoryFraction to restrict it to 50%. The configuration in java is implemented as follows:
    GPUOptions gpu = ConfigProto.getDefaultInstance().getGpuOptions().toBuilder().setPerProcessGpuMemoryFraction(0.5).setAllowGrowth(true).build();
    ConfigProto config = ConfigProto.newBuilder(ConfigProto.getDefaultInstance()).setLogDevicePlacement(true).mergeGpuOptions(gpu).build();
    However, it doesn't work and we get an exception: org.tensorflow.exceptions.TensorFlowException: 2 root error(s) found.
    (0) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, [...]
    Adam Pocock
    @Craigacp
    Could you post the full error message in a github issue?
    raftaa
    @raftaa
    I just created tensorflow/java#383 concerning the issue I mentioned above
    Adam Pocock
    @Craigacp
    Ok thanks, we'll follow up there.
    raftaa
    @raftaa
    I just noticed that the GPU memory is allocated when loading a model with "SavedModelBundle.load(...)". The GPUOptions in the ConfigProto are used later when opening a session e.g. to classify an image (at least in our code). How is this meant to be done? How can I set the GPU options before loading a model?
    raftaa
    @raftaa
    Ahhh... okay, now it works. It just placed the code to load the model after creating a session with the gpu parameters.
    Adam Pocock
    @Craigacp
    You should be able to supply the ConfigProto to the SavedModelBundle loader which should do that directly. I'd missed the SavedModelBundle part of your issue.
    raftaa
    @raftaa
    Yes, I see: SavedModelBundle.loader(tensorflowModelPath).withConfigProto(configProto).. thanks a lot, Adam. Sorry for the dumb questions.
    Adam Pocock
    @Craigacp
    No worries, it's not got the best documentation.
    Michael Kilian
    @deluxeomat
    Hi folks, just a question, is there a way to attach the tensorflow logging output to my log4j file logger?
    In python, i was able to pass my "log handler" with "tf.get_logger().addHandler(logHandler)" to receive all log events into my file logger.
    Now I'm searching for a simular solution in Java to log all the Tensorflow events.
    Adam Pocock
    @Craigacp
    It's being worked on but needs fixes in the TensorFlow C API.
    Karl Lessard
    @karllessard
    Hi everyone, just to announce that the latest 0.4.0 snapshots are now based on TF 2.6.0. For those who want to try it, let us know how it goes, thanks!
    tanzhenyu
    @tanzhenyu
    Good to know ConcreteFunction is now supported! Is that executing the same code path as what a traditional session.run(..., {'StatefulPartitionedCall'}, ...) does?
    Ryan Nett
    @rnett
    Yeah, that's what it uses internally. Although statefulness is determined by what's in the function
    Hanns Holger Rutz
    @Sciss
    Hi there. is tensorflow-java the best way to work with tensorflow in Scala, or are there alternative projects that be better suited to have direct Scala bindings?
    Adam Pocock
    @Craigacp
    I think it's the only one under active development. This project (https://github.com/eaplatanios/tensorflow_scala) has Scala bindings to the C API directly, but hasn't been updated to track newer versions of TensorFlow and I'm not sure of it's status.
    Hanns Holger Rutz
    @Sciss
    Ok, thanks. I'll check out both.
    Anthony Platanios
    @eaplatanios
    Hi! I’m behind tf-scala referenced above. It’s true that I haven’t updated the library in a while because I don’t have much free time, but it does work with TF 2.4 currently and we are also using it in production, so it’s reasonably stable.