Support slicing a shallow copy of a 3-d tensor (#83)
This commit is contained in:
@@ -57,9 +57,6 @@ Ort::Value GetEncoderOutFrame(OrtAllocator *allocator, Ort::Value *encoder_out,
|
||||
|
||||
auto offset = num_frames * encoder_out_dim;
|
||||
|
||||
auto memory_info =
|
||||
Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeDefault);
|
||||
|
||||
std::array<int64_t, 2> shape{batch_size, encoder_out_dim};
|
||||
|
||||
Ort::Value ans =
|
||||
@@ -90,9 +87,6 @@ Ort::Value Clone(OrtAllocator *allocator, const Ort::Value *v) {
|
||||
auto type_and_shape = v->GetTensorTypeAndShapeInfo();
|
||||
std::vector<int64_t> shape = type_and_shape.GetShape();
|
||||
|
||||
auto memory_info =
|
||||
Ort::MemoryInfo::CreateCpu(OrtDeviceAllocator, OrtMemTypeDefault);
|
||||
|
||||
switch (type_and_shape.GetElementType()) {
|
||||
case ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32: {
|
||||
Ort::Value ans = Ort::Value::CreateTensor<int32_t>(
|
||||
|
||||
Reference in New Issue
Block a user