Searched refs:origin_tensor (Results 1 – 8 of 8) sorted by relevance
65 schema::Tensor *origin_tensor = model_->all_tensors_.at(i); in ConvertTensors() local66 MS_CHECK_PTR_WITH_EXE(origin_tensor, clear_tensors()); in ConvertTensors()69 if (origin_tensor->dims() != nullptr) { in ConvertTensors()70 for (uint32_t j = 0; j < origin_tensor->dims()->size(); j++) { in ConvertTensors()71 MS_CHECK_PTR(origin_tensor->dims()->data()); in ConvertTensors()72 int dim = static_cast<int>(origin_tensor->dims()->data()[j]); in ConvertTensors()81 int origin_data_type = static_cast<int>(origin_tensor->dataType()); in ConvertTensors()83 …lite::Tensor(TypeId(origin_data_type), shape, static_cast<mindspore::Format>(origin_tensor->format… in ConvertTensors()84 TensorCategory(origin_tensor)); in ConvertTensors()86 if (origin_tensor->nodeType() == NodeType_ValueNode && origin_tensor->data() != nullptr && in ConvertTensors()[all …]
241 auto origin_tensor = std::dynamic_pointer_cast<tensor::Tensor>(weight_param->default_param()); in SplitWeights() local242 …if (origin_tensor->data_type() != kNumberTypeFloat32 && origin_tensor->data_type() != kNumberTypeF… in SplitWeights()246 auto data_ptr = reinterpret_cast<float *>(origin_tensor->data_c()); in SplitWeights()247 auto data_shape = origin_tensor->shape(); in SplitWeights()294 auto origin_tensor = std::dynamic_pointer_cast<tensor::Tensor>(old_bias_param->default_param()); in PopulateBiasNode() local295 MS_CHECK_TRUE_RET(origin_tensor != nullptr, RET_ERROR); in PopulateBiasNode()296 …if (origin_tensor->data_type() != kNumberTypeFloat32 && origin_tensor->data_type() != kNumberTypeF… in PopulateBiasNode()300 auto data_ptr = reinterpret_cast<float *>(origin_tensor->data_c()); in PopulateBiasNode()302 auto data_shape = origin_tensor->shape(); in PopulateBiasNode()
124 auto origin_tensor = std::dynamic_pointer_cast<tensor::Tensor>(origin_param); in CalEstimatedData() local125 MS_CHECK_TRUE_RET(origin_tensor != nullptr, RET_ERROR); in CalEstimatedData()126 auto origin_data = reinterpret_cast<float *>(origin_tensor->data_c()); in CalEstimatedData()138 for (int i = 0; i < origin_tensor->DataSize(); i++) { in CalEstimatedData()
440 auto origin_tensor = std::dynamic_pointer_cast<tensor::Tensor>(param_t->default_param()); in GetConcatedParam() local441 …if (origin_tensor->data_type() != kNumberTypeFloat32 && origin_tensor->data_type() != kNumberTypeF… in GetConcatedParam()445 auto data_ptr = reinterpret_cast<float *>(origin_tensor->data_c()); in GetConcatedParam()446 auto data_shape = origin_tensor->shape(); in GetConcatedParam()
51 auto origin_tensor = inputs_[index]; in set_input() local55 if (op->inputs()[i] == origin_tensor) { in set_input()65 auto origin_tensor = outputs_[index]; in set_output() local67 if (out_tensor_sorted_[i] == origin_tensor) { in set_output()
38 auto origin_tensor = this->inputs_[index]; in set_input() local41 if (kernel->inputs()[i] == origin_tensor) { in set_input()51 auto origin_tensor = this->outputs_[index]; in set_output() local54 if (kernel->outputs()[i] == origin_tensor) { in set_output()
295 auto *origin_tensor = restored_origin_tensor.first; in RestoreTensorData() local297 MS_ASSERT(origin_tensor != nullptr); in RestoreTensorData()301 if (origin_tensor->data() == nullptr) { in RestoreTensorData()304 origin_tensor->FreeData(); in RestoreTensorData()306 origin_tensor->set_data_type(restored_tensor->data_type()); in RestoreTensorData()307 origin_tensor->set_data(restored_tensor->data()); in RestoreTensorData()308 origin_tensor->set_own_data(own_data); in RestoreTensorData()
842 auto *origin_tensor = restored_origin_tensor.first; in RestoreTensorData() local844 MS_ASSERT(origin_tensor != nullptr); in RestoreTensorData()846 origin_tensor->FreeData(); in RestoreTensorData()847 origin_tensor->set_data_type(restored_tensor->data_type()); in RestoreTensorData()848 origin_tensor->set_data(restored_tensor->data()); in RestoreTensorData()849 origin_tensor->set_own_data(restored_tensor->own_data()); in RestoreTensorData()