Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 172 for Axis (0.06 sec)

  1. tensorflow/compiler/mlir/lite/experimental/tac/README.md

      %3 = "tfl.pack"(%1, %2) {tac.device = "CPU", tac.inference_type = "FLOAT", axis = 0 : i32, values_count = 2 : i32} : (tensor<1xf32>, tensor<1xf32>) -> tensor<2x1xf32>
      return %3 : tensor<2x1xf32>
    }
    ```
    
    In this code, `%3` is annotated with "CPU", while others are annotated with
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 29 18:32:13 UTC 2022
    - 11.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization.td

                 ">::Impl")>;
    
    // Specify the operand index of the coefficient operand for an affine op
    // and also the quantization dimension if per-axis quantization is support.
    // If the quantization dimension is -1, per-axis quantization isn't supported.
    class AffineOpCoefficient<int dim, int index> : NativeOpTrait<
      !strconcat("quant::AffineOpCoefficient<",
                 !interleave([dim, index], ", "),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

        // new quantization dimension. Only if the new quantization dimension can
        // be inferred, it is safe to reset the per-axis quantized type.
        if (axis == -1) return {};
        qtype =
            ResetAxisAndBroadcast(source_type.getShape(), per_axis, target, axis);
      }
      if (!qtype) return {};
      const Type final_type = qtype.castFromExpressedType(target);
      if (!final_type) return {};
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/reduce.h

        Value operand = reduce_op.getInputs().front();
        int64_t axis = reduce_op.getDimensions().getValues<int64_t>()[0];
    
        auto dim_type = RankedTensorType::get({1}, rewriter.getI32Type());
        auto reduction_indices = rewriter.create<arith::ConstantOp>(
            reduce_op.getLoc(), dim_type,
            rewriter.getI32TensorAttr({static_cast<int32_t>(axis)}));
    
        // Generate a Max and an ArgMax of as the mhlo op returns both while in TF
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td

    // Eliminate cumulative summations if the input's dimension in axis is 1.
    def EliminateCumSumInclusive : Pat<
      (TFL_CumsumOp
         $input,
         (Arith_ConstantOp I32ElementsAttr:$axis),
         ConstBoolAttrFalse,
         $reverse),
      (replaceWithValue $input),
      [(AreInputDimensionsOneInAxes $input, $axis)]>;
    
    // Fusing raw computation of GELU op into one native tfl_gelu op.
    //
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 20:31:41 UTC 2024
    - 66.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc

          return emitOpError("layerStats must have shape [2]");
        }
      }
      // Verify axisStats (optional) attribute.
      if (getAxisStats()) {
        if (!getAxis()) return emitOpError("axis must be specified for axisStats");
    
        auto shape = tensorArg.getShape();
        auto argSliceSize =
            std::accumulate(std::next(shape.begin(), *getAxis()), shape.end(), 1,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc

          return emitOpError("layerStats must have shape [2]");
        }
      }
      // Verify axisStats (optional) attribute.
      if (getAxisStats()) {
        if (!getAxis()) return emitOpError("axis must be specified for axisStats");
    
        auto shape = tensorArg.getShape();
        auto argSliceSize =
            std::accumulate(std::next(shape.begin(), *getAxis()), shape.end(), 1,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/utils/lstm_utils.cc

    }
    
    LogicalResult CreateEqualSizeSplitVOp(Value input, int axis, int splits,
                                          Location loc, OpBuilder* builder,
                                          Operation** result) {
      auto input_type = mlir::cast<RankedTensorType>(input.getType());
      SmallVector<int64_t, 4> output_shape;
      int size_of_splits;
      if (input_type.getRank() < axis || axis < 0) return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_custom_aggregation_op_to_quant_stats.cc

            {static_cast<float>(min.getValueAsDouble()),
             static_cast<float>(max.getValueAsDouble())});
        ElementsAttr axis_stats;
        IntegerAttr axis;
    
        quantfork::StatisticsOp stats_op = rewriter.create<quantfork::StatisticsOp>(
            op->getLoc(), op.getInput(), layer_stats, axis_stats, axis);
        op.getOutput().replaceAllUsesWith(stats_op.getResult());
        return success();
      }
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_traits.h

        }
      };
    };
    
    // The trait to specify the operand index of the coefficient for an affine op
    // and also the quantization dimension if per-axis quantization is support.
    // If the quantization dimension is -1, per-axis quantization isn't supported.
    //
    //   class Conv2DOp
    //       : public Op<Conv2DOp, OpTrait::quant::AffineOpCoefficient<0>::Impl>
    //
    template <int QuantDim, int OperandIndex = 1>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 5.8K bytes
    - Viewed (0)
Back to top