class_docstr: seq2seq recurrent neural network, implemented using TFLearn.
class_docstr_tok: ["seq2seq","recurrent","neural","network",",","implemented","using","TFLearn","."]
docstr: Construct canonical weights filename, based on model and pattern names.
docstr_tok: ["Construct","canonical","weights","filename",",","based","on","model","and","pattern","names","."]
code: def canonical_weights_fn(self, iteration_num=0):
      """
      Construct canonical weights filename, based on model and pattern names.
      """
      if not type(iteration_num) == int:
          try:
              iteration_num = int(iteration_num)
          except Exception as err:
              return iteration_num
      model_name = self.name or "basic"
      wfn = "ts2s__%s__%s_%s.tfl" % (
          model_name,
          self.sequence_pattern.PATTERN_NAME,
          iteration_num,
      )
      if self.data_dir:
          wfn = "%s/%s" % (self.data_dir, wfn)
      self.weights_filename = wfn
      return wfn
  
imports: from __future__ import division, print_function
  import os
  import sys
  import tflearn
  import argparse
  import json
  import numpy
  import tensorflow.compat.v1
  from tensorflow.contrib.legacy_seq2seq.python.ops import seq2seq
  from tensorflow.python.ops import rnn_cell
label_desc: Use image node_id 7 for calling the TFLearnSeq2Seq obj's underlying member method code with example usage: obj.canonical_weights_fn(iteration_num) and returns: wfn, iteration_num