Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 66 for tensorproto (0.2 sec)

  1. tensorflow/cc/ops/const_op.cc

      if (!val.status.ok()) {
        scope.UpdateStatus(val.status);
        return Output();
      }
      return ConstHelper(scope, val.tensor, val.tensor.dtype());
    }
    
    Output ConstFromProto(const Scope& scope, const TensorProto& proto) {
      return ConstHelper(scope, proto, proto.dtype());
    }
    
    NodeBuilder::NodeOut AsNodeOut(const Scope& scope, const Input& inp) {
      if (!inp.status().ok()) {
        scope.UpdateStatus(inp.status());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 03 20:58:54 UTC 2017
    - 2.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/jit/xla_device.h

          TF_LOCKS_EXCLUDED(mu_);
    
      Status MakeTensorFromProto(const TensorProto& tensor_proto,
                                 const AllocatorAttributes alloc_attrs,
                                 Tensor* tensor) override TF_LOCKS_EXCLUDED(mu_);
    
      Status MakeTensorFromProto(DeviceContext* device_context,
                                 const TensorProto& tensor_proto,
                                 const AllocatorAttributes alloc_attrs,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 21 09:53:30 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/utils/constant_utils.cc

      } else if (auto complex_type =
                     mlir::dyn_cast<mlir::ComplexType>(element_type)) {
        auto etype = complex_type.getElementType();
        if (etype.isF32()) {
          tensorflow::TensorProto repr;
          repr.set_dtype(tensorflow::DT_COMPLEX64);
    
          tensorflow::TensorShapeProto* shape = repr.mutable_tensor_shape();
          shape->set_unknown_rank(false);
          shape->add_dim()->set_size(int64_t{1});
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  4. tensorflow/c/tf_tensor_internal.h

      Status ToTensor(tensorflow::Tensor* dst) const;
      Status BitcastFrom(const TensorInterface& from, DataType type,
                         const int64_t* new_dims, int num_new_dims);
      Status FromProto(const tensorflow::TensorProto& from);
    
      tensorflow::Tensor& Tensor() { return tensor_; }
    
     private:
      tensorflow::Tensor tensor_;
    };
    
    inline Tensor& TensorFromInterface(AbstractTensorInterface* tensor) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Aug 24 20:38:55 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  5. tensorflow/cc/ops/const_op_test.cc

      EXPECT_EQ(d.op().output_type(0), DT_STRING);
      ExpectNodeEqual<tstring>(d.node(), {"1", "2", "3", "4", "5", "6"}, {2, 3});
    }
    
    TEST(ConstOpTest, FromProto) {
      Scope root = Scope::NewRootScope();
      TensorProto proto;
      proto.set_dtype(DT_DOUBLE);
      TensorShape({2, 2}).AsProto(proto.mutable_tensor_shape());
      for (int i = 0; i < 4; ++i) {
        proto.add_double_val(static_cast<double>(i));
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Aug 12 14:38:21 UTC 2019
    - 4.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/clone_constants_for_better_clustering.cc

        }
      }
    
      new_in->set_assigned_device_name(n->assigned_device_name());
      return new_in;
    }
    
    namespace {
    absl::StatusOr<bool> IsConstantSmall(Node* n) {
      const TensorProto* proto = nullptr;
      TF_RETURN_IF_ERROR(GetNodeAttr(n->def(), "value", &proto));
    
      int64_t total_elements = 1;
      for (const auto& dim : proto->tensor_shape().dim()) {
        if (dim.size() < 0) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 12 06:33:33 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/jit/node_matchers.cc

            *listener << "\nexpected name " << *name << " but found "
                      << node->name();
          }
          return false;
        }
    
        if (constant_value) {
          const TensorProto* proto = nullptr;
          if (!TryGetNodeAttr(node->def(), "value", &proto)) {
            if (listener->IsInterested()) {
              *listener << "\ncould not find \"value\" attribute in node";
            }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 03 16:15:20 UTC 2022
    - 16.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/jit/xla_device.cc

    Status XlaDevice::MakeTensorFromProto(DeviceContext* device_context,
                                          const TensorProto& tensor_proto,
                                          const AllocatorAttributes alloc_attrs,
                                          Tensor* tensor) {
      Tensor parsed(tensor_proto.dtype());
      if (!parsed.FromProto(cpu_allocator(), tensor_proto)) {
        return errors::InvalidArgument("Cannot parse tensor from proto: ",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 21:05:42 UTC 2024
    - 24.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/utils/const_tensor_utils.cc

        }
      }
      return absl::InvalidArgumentError(absl::StrCat(
          "unsupported bit width ", elem_type.getIntOrFloatBitWidth()));
    }
    
    tensorflow::TensorProto ConvertTfliteConstTensor(
        const TensorT& tensor, const std::vector<uint8_t>& buffer) {
      tensorflow::TensorProto ret;
      ret.set_dtype(TflTypeToTfType(tensor.type));
    
      tensorflow::TensorShapeProto* shape = ret.mutable_tensor_shape();
      shape->set_unknown_rank(false);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

              break;
            default:
              return errors::Unimplemented("Unhandled nested attribute!");
          }
        } else if (auto attr = mlir::dyn_cast<mlir::ElementsAttr>(a)) {
          TensorProto tensor;
          TF_RETURN_IF_ERROR(ConvertToTensorProto(attr, &tensor));
          *list->add_tensor() = tensor;
        } else if (auto attr = mlir::dyn_cast<mlir::FlatSymbolRefAttr>(a)) {
          AttrValue attr_val;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
Back to top