[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify the code snippets into categories from the provided list of categories. List of categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']"}, {'role': 'user', 'content': 'Identify to which category the provided code belongs and assign the code snippet to at least 1 but up to 5 categories based on the probabilities, ignore if the probability of the category is negligible. Strictly provide your response as a list. Avoid providing any additional information, commentary, or personal opinions.\\nPython Code:"""\nDON\'T MODIFY ANYTHING IN THIS CELL\n"""\nimport time\ndef get_accuracy(target, logits):\n"""\nCalculate accuracy\n"""\nmax_seq = max(target.shape[1], logits.shape[1])\nif max_seq - target.shape[1]:\ntarget = np.pad(\ntarget_batch,\n[(0,0),(0,max_seq - target_batch.shape[1]), (0,0)],\n\'constant\')\nif max_seq - batch_train_logits.shape[1]:\nlogits = np.pad(\nlogits,\n[(0,0),(0,max_seq - logits.shape[1]), (0,0)],\n\'constant\')\nreturn np.mean(np.equal(target, np.argmax(logits, 2)))\ntrain_source = source_int_text[batch_size:]\ntrain_target = target_int_text[batch_size:]\nvalid_source = helper.pad_sentence_batch(source_int_text[:batch_size])\nvalid_target = helper.pad_sentence_batch(target_int_text[:batch_size])\nwith tf.Session(graph=train_graph) as sess:\nsess.run(tf.global_variables_initializer())\nfor epoch_i in range(epochs):\nfor batch_i, (source_batch, target_batch) in enumerate(\nhelper.batch_data(train_source, train_target, batch_size)):\nstart_time = time.time()\n_, loss = sess.run(\n[train_op, cost],\n{input_data: source_batch,\ntargets: target_batch,\nlr: learning_rate,\nsequence_length: target_batch.shape[1],\nkeep_prob: keep_probability})\nbatch_train_logits = sess.run(\ninference_logits,\n{input_data: source_batch, keep_prob: 1.0})\nbatch_valid_logits = sess.run(\ninference_logits,\n{input_data: valid_source, keep_prob: 1.0})\ntrain_acc = get_accuracy(target_batch, batch_train_logits)\nvalid_acc = get_accuracy(np.array(valid_target), batch_valid_logits)\nend_time = time.time()\nprint(\'Epoch {:>3} Batch {:>4}/{} - Train Accuracy: {:>6.3f}, Validation Accuracy: {:>6.3f}, Loss: {:>6.3f}\'\n.format(epoch_i, batch_i, len(source_int_text) // batch_size, train_acc, valid_acc, loss))\nsaver = tf.train.Saver()\nsaver.save(sess, save_path)\nprint(\'Model Trained and Saved\')'}, {'role': 'assistant', 'content': "['evaluation', 'modelling']"}]