1. 14 9月, 2021 2 次提交
  2. 11 9月, 2021 1 次提交
  3. 10 9月, 2021 5 次提交
    • M
      Standardize and fix RandomCrop and CenterCrop when inputs too small · 6cf8b349
      Matt Watson 提交于
      When either layer receives an image that is smaller than the crop box, we will
      take the largest box inside the input image of the target aspect ratio, and resize
      it to fit. This is already the behavior of tge RandomCrop layer at inference time.
      
      PiperOrigin-RevId: 395828060
      6cf8b349
    • E
      Update Keras layers to use `tf.xyz` rather than `tf.raw_ops.xyz`. (E.g., use... · 817b16e0
      Edward Loper 提交于
      Update Keras layers to use `tf.xyz` rather than `tf.raw_ops.xyz`.  (E.g., use tf.matmul rather than tf.raw_ops.MatMul.)
      
      ExtensionTypes that want to support these layers can do so by adding dispatch.  (E.g., tf.matmul supports dispatch; but tf.raw_ops.MatMul does not.)
      
      PiperOrigin-RevId: 395815316
      817b16e0
    • E
      * Use public fields to access TypeSpec's shape. · 37bed5b3
      Edward Loper 提交于
      * When constructing a new KerasTensor: fail immediately if the wrapped TypeSpec has no shape, or if the shape is not a TensorShape.  (Exception: NoneTensorSpec is allowed, even though it has no shape.)
      * When accessing KerasTensor.dtype, fail with a useful error message if the wrapped TypeSpec has no dtype field, or if the dtype field is not a DType.
      * For TypeSpecs other than DenseSpec/RaggedTensorSpec/SparseTensorSpec, the `set_shape` method requires and uses a `TensorSpec.with_shape()` method that returns a copy of a spec with a new shape.  (Raise a useful error message if it's not there.)
      
      PiperOrigin-RevId: 395783105
      37bed5b3
    • E
      When converting ExtensionType inputs to match the expected dtype, only use... · 9010c9e2
      Edward Loper 提交于
      When converting ExtensionType inputs to match the expected dtype, only use tf.cast if the value doesn't already have the expected dtype.  (Not all ExtensionTypes add dispatch handlers for the tf.cast method, so we should avoid calling it unless it's necessary.)
      
      PiperOrigin-RevId: 395780095
      9010c9e2
    • E
      Update Keras layers to use `tf.xyz` rather than `tf.raw_ops.xyz`. (E.g., use... · f4f65ef0
      Edward Loper 提交于
      Update Keras layers to use `tf.xyz` rather than `tf.raw_ops.xyz`.  (E.g., use tf.matmul rather than tf.raw_ops.MatMul.)
      
      ExtensionTypes that want to support these layers can do so by adding dispatch.  (E.g., tf.matmul supports dispatch; but tf.raw_ops.MatMul does not.)
      
      PiperOrigin-RevId: 395747883
      f4f65ef0
  4. 09 9月, 2021 3 次提交
  5. 08 9月, 2021 3 次提交
  6. 07 9月, 2021 3 次提交
  7. 06 9月, 2021 3 次提交
    • A
      Fix truncated `steps_per_execution` which failed in distributed training. · f753edca
      A. Unique TensorFlower 提交于
      The problem is that for a dataset with e.g. 14 elements and `steps_per_exectuion=5`, the `DataAdapter.steps` iterator does the following:
      
       1. Yield `0`,
       2. Yield `5`,
       3. Set `steps_per_execution` to `4`, yield `10`,
       4. Set `steps_per_execution` back to `5`.
      
      The problem is that in distributed training, the steps are only enqueued, and not executed. So even if the value of `steps_per_execution` is adjusted to `4` for the  final step, and has a value of `4` when the task is enqueued, `steps_per_execution` is set back to `5` before the task is actually run.
      
      As a result, 15 steps are computed instead of 14.
      
      This change makes the number of steps a parameter of the internal `train_function`, `predict_function`, and `test_function` functions, and passes a copy of the value of `steps_per_execution` at the time the task is enqueued, e.g. between steps 3 and 4 above.
      
      PiperOrigin-RevId: 395042946
      f753edca
    • S
      Make the shim_test compatible with tf1 · 580f0446
      Scott Zhu 提交于
      PiperOrigin-RevId: 395027075
      580f0446
    • S
      Fix various failing tests in v1. Most of them are failing because of the... · f351f807
      Scott Zhu 提交于
      Fix various failing tests in v1. Most of them are failing because of the slight different behavior between v1 and v2. Some of them are only targeting to work with v2 behavior.
      
      PiperOrigin-RevId: 395026999
      f351f807
  8. 04 9月, 2021 6 次提交
  9. 03 9月, 2021 6 次提交
  10. 02 9月, 2021 2 次提交
  11. 01 9月, 2021 3 次提交
  12. 31 8月, 2021 3 次提交