def find_weights(name, which='weights'):
        for tw in tf.trainable_variables():
            if lax_naming:
                ok = tw.name.split(':')[0].endswith(name + '/' + which)
            else:
                ok = tw.name.split(':')[0] == name + '/' + which
            if ok:
                return tw
        return None