from tensorflow.contrib.layers.python.layers.layers import _build_variable_getter, _add_variable_to_collections

        # Add variables to collections.
        _add_variable_to_collections(layer.kernel, variables_collections, 'weights')
