getting started with neural networks here' what the samples look like nowx_train[ array( ]you should also vectorize your labelswhich is straightforwardy_train np asarray(train_labelsastype('float 'y_test np asarray(test_labelsastype('float 'now the data is ready to be fed into neural network building your network the input data is vectorsand the labels are scalars ( and )this is the easiest setup you'll ever encounter type of network that performs well on such problem is simple stack of fully connected (denselayers with relu activationsdense( activation='relu'the argument being passed to each dense layer ( is the number of hidden units of the layer hidden unit is dimension in the representation space of the layer you may remember from that each such dense layer with relu activation implements the following chain of tensor operationsoutput relu(dot(winputbhaving hidden units means the weight matrix will have shape (input_dimension )the dot product with will project the input data onto -dimensional representation space (and then you'll add the bias vector and apply the relu operationyou can intuitively understand the dimensionality of your representation space as "how much freedom you're allowing the network to have when learning internal representations having more hidden units ( higher-dimensional representation spaceallows your network to learn more-complex representationsbut it makes the network more computationally expensive and may lead to learning unwanted patterns (patterns that will improve performance on the training data but not on the test datathere are two key architecture decisions to be made about such stack of dense layershow many layers to use how many hidden units to choose for each layer in you'll learn formal principles to guide you in making these choices for the time beingyou'll have to trust me with the following architecture choicetwo intermediate layers with hidden units each third layer that will output the scalar prediction regarding the sentiment of the current review the intermediate layers will use relu as their activation functionand the final layer will use sigmoid activation so as to output probability ( score between and licensed to