Gets the variable uniquely identified by that name.

  Args:
    name: a name that uniquely identifies the variable.

  Returns:
    a tensorflow variable.

  Raises:
    ValueError: if no variable uniquely identified by the name exists.
963811
def get_unique_variable(name):
  
  candidates = tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, name)
  if not candidates:
    raise ValueError('Couldnt find variable %s' % name)

  for candidate in candidates:
    if candidate.op.name == name:
      return candidate
  raise ValueError('Variable %s does not uniquely identify a variable', name)
1044798
def _register_name(self, name):
        
        if name not in self._var_name_mappers:
            self._var_name_mappers[name] = VariableNamer(name)
71772
def getParameterByName(self, name):
        """"""
        result = None
        for parameter in self.getParameters():
            nameParam = parameter.getName()
            if nameParam == name:
                result = parameter
                break
        return result
1145227
def get_var_shape(self, name):
        
        rank = self.get_var_rank(name)
        name = create_string_buffer(name)
        arraytype = ndpointer(dtype='int32',
                              ndim=1,
                              shape=(MAXDIMS, ),
                              flags='F')
        shape = np.empty((MAXDIMS, ), dtype='int32', order='F')
        self.library.get_var_shape.argtypes = [c_char_p, arraytype]
        self.library.get_var_shape(name, shape)
        return tuple(shape[:rank])
213051
def get_var(name, factory=None):
    
    if name not in _VARS and factory is not None:
        _VARS[name] = factory()
    return _VARS.get(name)
438151
def get_parameter(self, name):
        
        for parameter in self._parameters:
            if parameter.name == name:
                return parameter
1142723
def get_onnx_variable_name(self, seed):
        '''
        
        '''
        if seed in self.variable_name_mapping:
            return self.variable_name_mapping[seed][-1]
        else:
            return self.get_unique_variable_name(seed)
651523
public SDVariable identity(String name, SDVariable input) {
        SDVariable s = f().identity(input);
        return updateVariableNameAndReference(s, name);
    }
772709
def values(self, name):
        
        return list(self.lookup_variables.get(unnest_path(name), Null))
1261573
def cls_get_by_name(cls, name):
    
    try:
        val = getattr(cls, name)
    except AttributeError:
        for attr in (a for a in dir(cls) if not a.startswith('_')):
            try:
                val = getattr(cls, attr)
            except AttributeError:
                # Is known to happen.
                continue
            valname = getattr(val, 'name', None)
            if valname == name:
                return val
        else:
            raise ValueError('No {} with that name: {}'.format(
                cls.__name__,
                name,
            ))
    else:
        return val
253950
def get_name(self, name):
        """"""
        if name not in self.get_names():
            raise exceptions.NameNotFoundError('name %s not found' % name)
        return self.get_names()[name]
1240895
public String getVariableAsString(String name) {
        TraceState ts = traceState.get();

        if (ts != null) {
            Object variable = ts.getVariables().get(name);
            if (log.isLoggable(Level.FINEST)) {
                log.finest("Get variable '" + name + "' = " + variable);
            }
            return variable == null ? null : variable.toString();
        }

        if (log.isLoggable(Level.FINEST)) {
            log.finest("Get variable '" + name + "' requested, but no trace state");
        }
        return null;
    }
1300047
def getNamedItem(self, name: str) -> Optional[Attr]:
        
        return self._dict.get(name, None)
820328
def uniqueName(self, name):
        
        try:
            suffix = self.name_suffixes[name]
        except KeyError:
            self.name_suffixes[name] = 0
            return name

        suffix += 1
        self.name_suffixes[name] = suffix

        return "%s%i" % (name, suffix)
686348
def __make_var(self, name: str, shape: list):
        
        return tf.get_variable(name, shape, trainable=self.__network.is_trainable())
1225116
def getvariable(name):
    """"""
    import inspect
    fr = inspect.currentframe()
    try:
        while fr:
            fr = fr.f_back
            vars = fr.f_locals
            if name in vars:
                return vars[name]
    except:
        pass
    return None
1274357
def variable(self, name: str, default_value=None):
        
        return self.__variables.get(name, default_value)