---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-4-29974134b16e> in <module>()
1 logger.info('Prepare CNN for training')
----> 2 network = cnn.net_nodule2d_swethasubramanian(IMAGE_DIMS)
3 model = cnn.prepare_cnn_model(network, OUTPUT_DIR, model_file=None)
/notebooks/datascience-snippets/kaggle-lung-cancer/modules/cnn.py in net_nodule2d_swethasubramanian(image_dims)
33 net = layers.core.input_data(shape=[None, image_dims[0], image_dims[1], image_dims[2], image_dims[3]], dtype=tf.float32, data_preprocessing=img_prep, data_augmentation=img_aug)
34
---> 35 net = layers.conv.conv_2d(net, 50, 3, activation='relu')
36 net = layers.conv.max_pool_2d(net, 2)
37 net = layers.conv.conv_2d(net, 64, 3, activation='relu')
/usr/local/lib/python3.4/dist-packages/tflearn/layers/conv.py in conv_2d(incoming, nb_filter, filter_size, strides, padding, activation, bias, weights_init, bias_init, regularizer, weight_decay, trainable, restore, reuse, scope, name)
63 """
64 input_shape = utils.get_incoming_shape(incoming)
---> 65 assert len(input_shape) == 4, "Incoming Tensor shape must be 4-D"
66 filter_size = utils.autoformat_filter_conv2d(filter_size,
67 input_shape[-1],
AssertionError: Incoming Tensor shape must be 4-D