Example #1
0
 def __init__(self, compute_devices=None, parameter_device=None):
     """Initializes this strategy with default TFConfigClusterResolver."""
     super(CentralStorageStrategyV1, self).__init__(
         parameter_server_strategy.ParameterServerStrategyExtended(
             self,
             compute_devices=compute_devices,
             parameter_device=parameter_device))
Example #2
0
 def __init__(self, compute_devices=None, parameter_device=None):
   super(CentralStorageStrategyV1, self).__init__(
       parameter_server_strategy.ParameterServerStrategyExtended(
           self,
           compute_devices=compute_devices,
           parameter_device=parameter_device))
   distribute_lib.distribution_strategy_gauge.get_cell('V1').set(
       'CentralStorageStrategy')
 def __init__(self, cluster_resolver=None):
     """Initializes this strategy."""
     # The `cluster_resolver` must be set so that
     # `ParameterServerStrategyExtended` will keep num_gpus for `configure`
     # method.
     if cluster_resolver is None:
         cluster_resolver = TFConfigClusterResolver()
     extended = parameter_server_strategy.ParameterServerStrategyExtended(
         self, cluster_resolver=cluster_resolver)
     super(ParameterServerStrategy, self).__init__(extended)
Example #4
0
    def __init__(self, compute_devices=None, parameter_device=None):
        extended = parameter_server_strategy.ParameterServerStrategyExtended(
            self,
            compute_devices=compute_devices,
            parameter_device=parameter_device)
        """Initializes the strategy with optional device strings.

    Args:
    compute_devices: an optional list of strings for device to replicate models
      on. If this is not provided, all local GPUs will be used; if there is no
      GPU, local CPU will be used.
    parameter_device: an optional device string for which device to put
      variables on. The default one is CPU or GPU if there is only one.
    """
        super(CentralStorageStrategy, self).__init__(extended)
Example #5
0
 def __init__(self, cluster_resolver):
     super(MockCoreParameterServerStrategy, self).__init__(
         core_parameter_server_strategy.ParameterServerStrategyExtended(
             self, cluster_resolver=cluster_resolver))
Example #6
0
 def __init__(self, compute_devices=None, parameter_device=None):
     extended = parameter_server_strategy.ParameterServerStrategyExtended(
         self,
         compute_devices=compute_devices,
         parameter_device=parameter_device)
     super(CentralStorageStrategy, self).__init__(extended)