Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for OneHot (0.21 sec)

  1. tensorflow/compiler/mlir/tfr/examples/pad/ops_defs.py

        outputs=['output: T'])
    def _composite_mirror_pad(input_, paddings, mode):
      shape = input_.shape.as_list()
      for i in range(len(shape)):
        rdims = tf.raw_ops.OneHot(
            indices=i, depth=len(shape), on_value=True, off_value=False, axis=-1)
        rarray = tf.raw_ops.Reverse(tensor=input_, dims=rdims)
    
        left_padding_size = tf.raw_ops.GatherNd(params=paddings, indices=[i, 0])
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Oct 01 05:00:29 UTC 2021
    - 5.6K bytes
    - Viewed (0)
  2. tensorflow/cc/framework/fuzzing/op_fuzzing.bzl

    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Nov 07 19:14:57 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

      "32 bit integer tensor">;
    
    def ConvertSingleElementAttrToFloatAttr :
      NativeCodeCall<"ConvertSingleElementAttrToFloatAttr($0)">;
    
    // Replace
    //   (float)OneHot(index, depth, on_val, off_val, axis)
    // With
    //   OneHot(index, depth, (float)on_val, (float)off_val, axis)
    def FuseOneHotAndCastToFloat : Pat<
      (TFL_CastOp:$output (TFL_OneHotOp $indices,
                                        $depth,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tfr/python/tfr_gen_test.py

    def _tfr_tensor_two_output(x):
      z = array_ops.Split(axis=0, value=x, num_split=2)
      return z[0], z[1]
    
    
    @composite.Composite('TestNumAttrsOp')
    def _tfr_tensor_tensor_with_cst(x1, y1, x2, y2):
      x = array_ops.OneHot(
          indices=[0, 2, -1, x1], depth=y1, on_value=True, off_value=False)
      (x, x2, y2)  # pylint: disable=pointless-statement
      return
    
    #--- test fn for scf control flow ---
    
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 13 16:33:28 UTC 2021
    - 28.8K bytes
    - Viewed (0)
  5. tensorflow/cc/gradients/array_grad.cc

    REGISTER_NO_GRADIENT_OP("Shape");
    REGISTER_NO_GRADIENT_OP("ShapeN");
    REGISTER_NO_GRADIENT_OP("Rank");
    REGISTER_NO_GRADIENT_OP("Size");
    REGISTER_NO_GRADIENT_OP("BroadcastGradientArgs");
    REGISTER_NO_GRADIENT_OP("OneHot");
    
    Status PackGrad(const Scope& scope, const Operation& op,
                    const std::vector<Output>& grad_inputs,
                    std::vector<Output>* grad_outputs) {
      int N;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 10 23:33:32 UTC 2023
    - 31.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/tests/tf-ops.mlir

      func.return %0 : tensor<?x?xf32>
    }
    
    // -----
    
    func.func @testOneHot(%indices: tensor<3xi32>, %depth: tensor<i32>, %on_value: tensor<f32>, %off_value: tensor<f32>) -> tensor<3x5xf32> {
      %result = "tf.OneHot"(%indices, %depth, %on_value, %off_value) {axis = -1 : i64} : (tensor<3xi32>, tensor<i32>, tensor<f32>, tensor<f32>) -> tensor<3x5xf32>
      func.return %result : tensor<3x5xf32>
    }
    
    // -----
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 23 14:40:35 UTC 2023
    - 236.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/tests/legalize-tf.mlir

      // CHECK: return %0 : tensor<2x3x4x5xf32>
    }
    
    func.func @OneHot(%arg0: tensor<3xi32>, %arg1: tensor<i32>, %arg2: tensor<f32>, %arg3: tensor<f32>) -> tensor<*xf32> {
      %0 = "tf.OneHot"(%arg0, %arg1, %arg2, %arg3) {axis = -1 : i64} : (tensor<3xi32>, tensor<i32>, tensor<f32>, tensor<f32>) -> tensor<*xf32>
      func.return %0: tensor<*xf32>
    
    // CHECK-LABEL: OneHot
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 05 01:54:33 UTC 2024
    - 153.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/optimize.cc

      return true;
    }
    
    // Returns true if attr is a DenseIntElementsAttr of int32 or int64 values or an
    // incrementing sequence from 0 to N-1.
    //
    // If such a value is used in an Equal operator, it can be replaced with OneHot.
    bool IsOneHotIndexAttribute(Attribute attr) {
      const auto dense_attr = mlir::dyn_cast_or_null<DenseIntElementsAttr>(attr);
      if (!dense_attr) {
        return false;
      }
      auto index_type = dense_attr.getType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/jit/mark_for_compilation_pass.cc

    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 12:19:41 UTC 2024
    - 85.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/tests/lower_tf.mlir

      // CHECK-DAG: %[[ZERO:.*]] = "tf.Const"() <{value = dense<0.000000e+00> : tensor<f32>}> : () -> tensor<f32>
      // CHECK-DAG: %[[LABELS:.*]] = "tf.OneHot"(%[[SPARSE_LABELS]], %[[DEPTH]], %[[ONE]], %[[ZERO]]) <{axis = 1 : i64}> : (tensor<2xi32>, tensor<i32>, tensor<f32>, tensor<f32>) -> tensor<2x3xf32>
    
      // Adjust labels to have Nan for out of range labels.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jan 05 18:35:42 UTC 2024
    - 92K bytes
    - Viewed (0)
Back to top