(method_name, unused_kwargs, constructor_kwargs)
Returns a nest of `TensorSpec` with the method's output specification.
Returns a nest of `TensorSpec` with the method's output specification.
Returns a nest of TensorSpec with the method s output specification .
def _tensor_specs(method_name, unused_kwargs, constructor_kwargs):
    """Returns a nest of `TensorSpec` with the method's output specification."""
    width = constructor_kwargs['config'].get('width', 320)
    height = constructor_kwargs['config'].get('height', 240)

    observation_spec = [
        tf.contrib.framework.TensorSpec([height, width, 3], tf.uint8),
        tf.contrib.framework.TensorSpec([], tf.string),
    ]

    if method_name == 'initial':
      return observation_spec
    elif method_name == 'step':
      return (
          tf.contrib.framework.TensorSpec([], tf.float32),
          tf.contrib.framework.TensorSpec([], tf.bool),
          observation_spec,
      )
def _tensor_specs ( method_name , unused_kwargs , constructor_kwargs ) : width = constructor_kwargs [ 'config' ] . get ( 'width' , 320 ) height = constructor_kwargs [ 'config' ] . get ( 'height' , 240 ) observation_spec = [ tf . contrib . framework . TensorSpec ( [ height , width , 3 ] , tf . uint8 ) , tf . contrib . framework . TensorSpec ( [ ] , tf . string ) , ] if method_name == 'initial' : return observation_spec elif method_name == 'step' : return ( tf . contrib . framework . TensorSpec ( [ ] , tf . float32 ) , tf . contrib . framework . TensorSpec ( [ ] , tf . bool ) , observation_spec , )