Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 205 for dims1 (0.07 sec)

  1. tensorflow/c/eager/parallel_device/parallel_device_testlib.cc

                               const int64_t* dims, const int num_dims,
                               const char* device, TF_Status* status) {
      std::unique_ptr<TFE_Op, decltype(&TFE_DeleteOp)> op(
          TFE_NewOp(context, "VarHandleOp", status), TFE_DeleteOp);
      if (TF_GetCode(status) != TF_OK) return nullptr;
      TFE_OpSetAttrType(op.get(), "dtype", type);
      TFE_OpSetAttrShape(op.get(), "shape", dims, num_dims, status);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 15 15:44:44 UTC 2021
    - 12.5K bytes
    - Viewed (0)
  2. tensorflow/c/experimental/gradients/math_grad_test.cc

        ASSERT_NO_FATAL_FAILURE(CheckTensorValue(outputs[0], dA_vals[i],
                                                 /*dims*/ {3, 3},
                                                 /*abs_error*/ 0));
        ASSERT_NO_FATAL_FAILURE(CheckTensorValue(outputs[1], dB_vals[i],
                                                 /*dims*/ {3, 3},
                                                 /*abs_error*/ 0));
        outputs[0]->Unref();
        outputs[1]->Unref();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 13 17:32:14 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  3. tensorflow/c/c_api.cc

      static char empty;
      int64_t nelems = 1;
      std::vector<int64_t> dims;
      dims.reserve(shape.dims());
      for (int i = 0; i < shape.dims(); ++i) {
        dims.push_back(shape.dim_size(i));
        nelems *= shape.dim_size(i);
      }
      CHECK_EQ(nelems, 0);
      return TF_NewTensor(
          dtype, reinterpret_cast<const int64_t*>(dims.data()), shape.dims(),
          reinterpret_cast<void*>(&empty), 0, [](void*, size_t, void*) {}, nullptr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 03:35:10 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  4. tensorflow/c/experimental/gradients/grad_test_helper.h

        absl::Span<AbstractTensorHandle* const> inputs, bool use_function,
        double abs_error = 1e-2);
    
    void CheckTensorValue(AbstractTensorHandle* t, absl::Span<const float> manuals,
                          absl::Span<const int64_t> dims, double abs_error = 1e-2);
    
    Model BuildGradModel(Model forward, GradientRegistry registry);
    
    }  // namespace internal
    }  // namespace gradients
    }  // namespace tensorflow
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jan 14 20:36:51 UTC 2021
    - 1.5K bytes
    - Viewed (0)
  5. tensorflow/c/tf_shape.cc

    extern "C" {
    
    TF_Shape* TF_NewShape() {
      return tensorflow::wrap(new tensorflow::PartialTensorShape());
    }
    
    int TF_ShapeDims(const TF_Shape* shape) {
      return tensorflow::unwrap(shape)->dims();
    }
    
    int64_t TF_ShapeDimSize(const TF_Shape* shape, int d) {
      return tensorflow::unwrap(shape)->dim_size(d);
    }
    
    void TF_DeleteShape(TF_Shape* shape) { delete tensorflow::unwrap(shape); }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 30 00:25:41 UTC 2020
    - 1.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_to_mhlo_int_test.cc

      absl::StatusOr<xla::Literal> CreateRandomF32Literal(
          absl::Span<const int64_t> dims, float min = -100, float max = 100) {
        TF_ASSIGN_OR_RETURN(auto shape,
                            xla::ShapeUtil::MakeValidatedShape(xla::F32, dims));
        return xla::LiteralUtil::CreateLiteralWithGenerator<xla::F32, float>(
            shape, [this, min, max](absl::Span<const int64_t> dims) -> float {
              return absl::Uniform(bitgen_, min, max);
            });
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 03 01:03:21 UTC 2024
    - 35.8K bytes
    - Viewed (0)
  7. tensorflow/c/eager/c_api.cc

          } else {
            const auto num_dims = tensor_shape.dim_size();
            std::unique_ptr<int64_t[]> dims(new int64_t[num_dims]);
            for (int i = 0; i < num_dims; ++i) {
              dims[i] = tensor_shape.dim(i).size();
            }
            TFE_OpSetAttrShape(op, attr_name, dims.get(), num_dims, status);
          }
        } break;
        case tensorflow::AttrValue::kFunc: {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 08:11:23 UTC 2024
    - 44K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.td

    def LowerFillOp : Pat<(TF_FillOp $dims, $value),
                          (TF_BroadcastToOp $value, $dims)>;
    
    //===----------------------------------------------------------------------===//
    // Empty op patterns.
    //===----------------------------------------------------------------------===//
    
    def LowerEmptyOp : Pat<(TF_EmptyOp:$result $dims, TrueBoolAttr:$init),
                          (TF_BroadcastToOp
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 04 13:30:42 UTC 2024
    - 24.7K bytes
    - Viewed (0)
  9. tensorflow/c/kernels_experimental.cc

                                                    TF_Status* status) {
      ::tensorflow::TensorShape shape;
      auto* cc_ctx = reinterpret_cast<::tensorflow::OpKernelConstruction*>(ctx);
      ::tensorflow::Status s = cc_ctx->GetAttr(attr_name, &shape);
      ::tensorflow::Set_TF_Status_from_Status(status, s);
      size_t rank = static_cast<size_t>(shape.dims());
    
      if (!status->status.ok()) return;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 23 06:12:29 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.cc

      if (!shaped_type) return false;
    
      return shaped_type.hasStaticShape();
    }
    
    bool HasStaticShapeAtDims(Value value, const ArrayRef<int> dims) {
      auto shaped_type = mlir::dyn_cast<ShapedType>(value.getType());
      if (!shaped_type || !shaped_type.hasRank()) return false;
    
      for (auto dim : dims) {
        if (shaped_type.isDynamicDim(dim)) return false;
      }
      return true;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
Back to top