I am using fully connected layer. The parameters required are input, number of output nodes and the activation function. But the number of output nodes is a tensor value that depends on the value of a placeholder. The code is attached below.
I need the variable rate to be a placeholder because, I have to change its value during training.
rate = tf.placeholder(tf.float32, shape=(), name='code_rate')
num_out = tf.to_int32(1/rate)
enc_out = layers.fully_connected(input_to_fcnn, num_out, tf.nn.relu)
During initialisation since the tensors are not defined, I get this error
num_outputs type should be one of class 'int', got class 'tensorflow.python.framework.ops.Tensor'
Is there any workaround to this? Thanks in advance!