MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / get_variable

Method get_variable

tensorpack/tfutils/tower.py:435–448  ·  view source on GitHub ↗

Get a variable used in this tower. The name should not contain the variable scope prefix of the tower. When the tower has the same variable scope and name scope, this is equivalent to :meth:`get_tensor`.

(self, name)

Source from the content-addressed store, hash-verified

433 return self.get_tensor(name)
434
435 def get_variable(self, name):
436 """
437 Get a variable used in this tower.
438 The name should not contain the variable scope prefix of the tower.
439
440 When the tower has the same variable scope and name scope, this is equivalent to
441 :meth:`get_tensor`.
442 """
443 name = get_op_tensor_name(name)[1]
444 if len(self.vs_name):
445 name_with_vs = self.vs_name + "/" + name
446 else:
447 name_with_vs = name
448 return get_op_or_tensor_by_name(name_with_vs)
449
450 def get_variables(self, names):
451 """

Callers 15

get_tensorMethod · 0.95
get_variablesMethod · 0.95
_apply_shadow_varsMethod · 0.80
PReLUFunction · 0.80
get_bn_variablesFunction · 0.80
get_bn_variablesFunction · 0.80
LayerNormFunction · 0.80
InstanceNormFunction · 0.80
Conv2DFunction · 0.80
Conv2DTransposeFunction · 0.80

Calls 2

get_op_tensor_nameFunction · 0.85
get_op_or_tensor_by_nameFunction · 0.85

Tested by 1