'Construct canonical weights filename, based on model and pattern names.'

def canonical_weights_fn(self, iteration_num=0):

    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
