Skip to content
Advertisement

Tag: tensorflow2.0

Tensorflow: `tf.reshape((), (0))` works fine in eager mode but ValueError in Graph mode

As the title, the function tf.reshape((), (0)) works perfectly fine in eager mode. But when I use it in Graph mode, it returns: ValueError: Shape must be rank 1 but is rank 0 for ‘{{node Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32](Reshape/tensor, Reshape/shape)’ with input shapes: [0], []. Can anyone help me with the work-around of this function please. You can reproduce this

Tensorflow Lite, Image size is zero error

Actually, my question is very simple. I would like to use my own data in tensorflow lite model. So, i wrote these line of codes: Also, this is the error that I encountered: Answer This happens when the Dataloader cannot infer the labels of your images. The images should be divided into subfolders according to the class they belong to:

Compute gradients across two models

Let’s assume that we are building a basic CNN that recognizes pictures of cats and dogs (binary classifier). An example of such CNN can be as follows: Let’s also assume that we want to have the model split into two parts, or two models, called model_0 and model_1. model_0 will handle the input, and model_1 will take model_0 output and

Advertisement