[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify code snippets into one of the following categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']."}, {'role': 'user', 'content': 'Identify the single most appropriate category to which the provided code belongs. Provide your response as a single category label without any additional information, commentary, or personal opinions.\\nPython Code:def build_rnn(num_classes, batch_size=50, num_steps=50, lstm_size=128, num_layers=2,\nlearning_rate=0.001, grad_clip=5, sampling=False):\nif sampling == True:\nbatch_size, num_steps = 1, 1\ntf.reset_default_graph()\nwith tf.name_scope(\'inputs\'):\ninputs = tf.placeholder(tf.int32, [batch_size, num_steps], name=\'inputs\')\nx_one_hot = tf.one_hot(inputs, num_classes, name=\'x_one_hot\')\nwith tf.name_scope(\'targets\'):\ntargets = tf.placeholder(tf.int32, [batch_size, num_steps], name=\'targets\')\ny_one_hot = tf.one_hot(targets, num_classes, name=\'y_one_hot\')\ny_reshaped = tf.reshape(y_one_hot, [-1, num_classes])\nkeep_prob = tf.placeholder(tf.float32, name=\'keep_prob\')\nwith tf.name_scope("RNN_cells"):\nlstm = tf.contrib.rnn.BasicLSTMCell(lstm_size)\ndrop = tf.contrib.rnn.DropoutWrapper(lstm, output_keep_prob=keep_prob)\ncell = tf.contrib.rnn.MultiRNNCell([drop] * num_layers)\nwith tf.name_scope("RNN_init_state"):\ninitial_state = cell.zero_state(batch_size, tf.float32)\nwith tf.name_scope("RNN_forward"):\nrnn_inputs = [tf.squeeze(i, squeeze_dims=[1]) for i in tf.split(x_one_hot, num_steps, 1)]\noutputs, state = tf.contrib.rnn.static_rnn(cell, rnn_inputs, initial_state=initial_state)\nfinal_state = state\nwith tf.name_scope(\'sequence_reshape\'):\nseq_output = tf.concat(outputs, axis=1,name=\'seq_output\')\noutput = tf.reshape(seq_output, [-1, lstm_size], name=\'graph_output\')\nwith tf.name_scope(\'logits\'):\nsoftmax_w = tf.Variable(tf.truncated_normal((lstm_size, num_classes), stddev=0.1),\nname=\'softmax_w\')\nsoftmax_b = tf.Variable(tf.zeros(num_classes), name=\'softmax_b\')\nlogits = tf.matmul(output, softmax_w) + softmax_b\ntf.summary.histogram(\'softmax_w\', softmax_w)\ntf.summary.histogram(\'softmax_b\', softmax_b)\nwith tf.name_scope(\'predictions\'):\npreds = tf.nn.softmax(logits, name=\'predictions\')\ntf.summary.histogram(\'predictions\', preds)\nwith tf.name_scope(\'cost\'):\nloss = tf.nn.softmax_cross_entropy_with_logits(logits=logits, labels=y_reshaped, name=\'loss\')\ncost = tf.reduce_mean(loss, name=\'cost\')\ntf.summary.scalar(\'cost\', cost)\nwith tf.name_scope(\'train\'):\ntvars = tf.trainable_variables()\ngrads, _ = tf.clip_by_global_norm(tf.gradients(cost, tvars), grad_clip)\ntrain_op = tf.train.AdamOptimizer(learning_rate)\noptimizer = train_op.apply_gradients(zip(grads, tvars))\nmerged = tf.summary.merge_all()\nexport_nodes = [\'inputs\', \'targets\', \'initial_state\', \'final_state\',\n\'keep_prob\', \'cost\', \'preds\', \'optimizer\', \'merged\']\nGraph = namedtuple(\'Graph\', export_nodes)\nlocal_dict = locals()\ngraph = Graph(*[local_dict[each] for each in export_nodes])\nreturn graph'}, {'role': 'assistant', 'content': 'modelling'}]