def get_dim_for_descriptor(self, descriptor, all_layers): """Returns the dimension of a Descriptor object. This is a convenience function used in set_configs. """ layer_to_dim_func = \ lambda name: xutils.get_dim_from_layer_name(all_layers, self, name) return descriptor.dim(layer_to_dim_func)
def get_dim_for_descriptor(self, descriptor, all_layers): """Returns the dimension of a Descriptor object. This is a convenience function used in set_configs. """ layer_to_dim_func = \ lambda name: xutils.get_dim_from_layer_name(all_layers, self, name) return descriptor.dim(layer_to_dim_func)