Git Product home page Git Product logo

Comments (5)

nsthorat avatar nsthorat commented on May 18, 2024

For TF implementation of the resizeBilinear gradient we will implement:
https://github.com/tensorflow/tensorflow/blob/9832df/tensorflow/core/kernels/resize_bilinear_op.cc#L275

We have a tf.tile() op, does that suffice? What are you looking for with repeat?

from tfjs.

tehZevo avatar tehZevo commented on May 18, 2024

Awesome to hear about resizeBilinear gradient! As for repeat, I was looking for an op that would perform an element-wise repeat (tensorflow/tensorflow#8246), eg: repeating

[[1, 2],
 [3, 4]]

with [2, 2] would yield:

[[1, 1, 2, 2],
 [1, 1, 2, 2],
 [3, 3, 4, 4],
 [3, 3, 4, 4]]

I was going to use that as an upsampling op to match the tf.maxPool()s on the other side of my autoencoder.

Slightly related: I attempted implementing the solution (tile & reshape) posted in the above TensorFlow issue, but hit an exception when attempting to call tf.tile() on rank 5 tensors.

from tfjs.

nsthorat avatar nsthorat commented on May 18, 2024

Are you trying to repeat on a 4D tensor? Just curious, what is the use-case?

We actually haven't done any work with rank-5 Tensors, but we can add support if there's a driving use case here.

from tfjs.

tehZevo avatar tehZevo commented on May 18, 2024

The only reason I would have needed rank 5 tensors would be to implement the makeshift "repeat" solution posted here: tensorflow/tensorflow#8246 , which I only needed in absence of tf.resizeBilinear gradients. I was trying to achieve the same thing: "upsample" a [batchSize, height, width, numChannels] tensor to [batchSize, height * 2, width * 2, numChannels]. Sorry for the confusion.

from tfjs.

dsmilkov avatar dsmilkov commented on May 18, 2024

Hi @tehZevo , gradient for resizeBilinear was added in tensorflow/tfjs-core#996 . Make sure to use the latest tfjs. I'm going to close this issue, as per its title, we've fixed it, but feel free to reopen if you run into any issues with resizeBilinear or its gradient.

from tfjs.

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.