in Education by
Using up-to-date Keras and Tensorflow on Ubuntu 16.04 and 14.04. For the following code: img2D = Input(shape=(100, 100, 3)) refPosX = Input(shape=(100, 100, 1)) refPosY = Input(shape=(100, 100, 1)) # refImg = Input(shape=(100, 100, 3)) # Passing values to depth net depth_map = depth_net(dFeatures) curX = tf.multiply(depth_map, refPosX) # curY = K.dot(depth_map, refPosY) curY = tf.multiply(depth_map, refPosY) # dMove = concatenate([curX, curY]) dMove = tf.concat([curX, curY], axis=3) warped = tfc.image.dense_image_warp(img2D, dMove) I'm receiving the error output: Using TensorFlow backend. Traceback (most recent call last): File "/home/carson/ws/dla/test_network_5/depth_and_color_nets.py", line 89, in File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/image/python/ops/dense_image_warp.py", line 195, in dense_image_warp [batch_size, height * width, 2]) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_array_ops.py", line 6482, in reshape "Reshape", tensor=tensor, shape=shape, name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 513, in _apply_op_helper raise err TypeError: Failed to convert object of type to Tensor. Contents: [None, 10000, 2]. Consider casting elements to a supported type. I'm a bit confused as I don't know where I'm going wrong here. Why would the elements not be of a supported type? At what point am I passing a list object to the function? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
The error comes from the shape of the inputs. The function tfc.image.dense_image_warp requires inputs of shapes [batch, height, width, channels] and [batch, height, width, 2] respectively with a specified batch size. (cf https://www.tensorflow.org/api_docs/python/tf/contrib/image/dense_image_warp) Specifically, None values for batch size are not supported and lead to the error you have encountered.

Related questions

0 votes
    Suppose I have a Tensorflow tensor. How do I get the dimensions (shape) of the tensor as integer values? I ... 'Dimension' instead. Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    I am new to TensorFlow. While I am reading the existing documentation, I found the term tensor really confusing. ... types of tensors? Select the correct answer from above options...
asked Jan 29, 2022 in Education by JackTerrance
0 votes
    I'm creating a very basic AI with Tensorflow, and am using the code from the official docs/tutorial. Here's my ... Tensorflow 1.13.1. Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    I am trying to decompose a 3D matrix using python library scikit-tensor. I managed to decompose my Tensor ... the decomposed matrices? Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    I was looking at the docs of TensorFlow about tf.nn.conv2d here. But I can't understand what it does or ... it raised the question. Select the correct answer from above options...
asked Jan 27, 2022 in Education by JackTerrance
0 votes
    I am having problem in understanding the difference between three optimizers for loss.I went through some documents ... differences? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    In tf.nn.max_pool of tensorflow what is the difference between 'SAME' and 'VALID'? I read in here that ... pool means in tensorflow? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I read that regularization terms are implemented by manually adding an additional term to loss value in neural network ... it manually? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    What is global_step ? why do we use '0' while setting up global_step? def training(loss,learning_rate): tf. ... global_step becomes 1? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I want to assign a value to a TensorFlow variable in Python and I am using this: import tensorflow as tf import ... do to correct this? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    I want different learning layers in different layers just like we do in Caffe. I just want to speed up the training ... can I do this? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    Is Tensorflow similar to scikit learn's one hot encoder for processing of categorical data? Does using placeholder of ... very easy. Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    Currently, I have Keras with TensorFlow and CUDA at the backend. But, I want to force Keras to use the ... are accessible via Keras. Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    I have noticed that in most models step parameter is used to indicate the no. of steps to run over data ... epochs? Data shuffling? Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
0 votes
    I recently started finding out deep learning & machine learning techniques, and I started sorting out frameworks ... machine learning. Select the correct answer from above options...
asked Jan 22, 2022 in Education by JackTerrance
...