in Education by
Is tf.contrib.layers.flatten(x) the same as tf.reshape(x, [n, 1])? Can anyone help me with this? Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
tf.contrib.layers.flatten(x) flattens the input and the flattened tensor with shape [batch_size, k]. Does not affect the batch size. It is equivalent to the following: flattened = tf.reshape(x, [tf.shape(x)[0], -1]) If you want to learn Artificial Intelligence using TensorFlow, then check out this Artificial Intelligence Course by Intellipaat.

Related questions

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 am trying to understand the role of the Flatten function in Keras. Below is my code, which is a simple two ... flatten it? Thanks! Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    What is the role of Flatten in Keras. I am executing the code below and it's a two layered network. The ... output is already flat? Select the correct answer from above options...
asked Jan 25, 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
    What does the following function do? Should I consider it as a lookup table like in skip-gram model? tf.nn. ... mod', name=None) Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
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
    Using up-to-date Keras and Tensorflow on Ubuntu 16.04 and 14.04. For the following code: img2D = ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
0 votes
    I have worked all the tutorials and searched for "load csv tensorflow" but just can't get the logic of it all. ... and test the net. Select the correct answer from above options...
asked Feb 1, 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'm wondering how to calculate precision and recall measures for multiclass multilabel classification, i.e. classification ... labels? Select the correct answer from above options...
asked Jan 31, 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 have a Python dictionary like the following: {u'2012-06-08': 388, u'2012-06-09': 388, u'2012-06-10 ... (my_dict,index=my_dict.keys()) 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
    I want my model to be trained with some classified images. They are of different sizes, so how can I train ... resizing the images? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
...