Skip to content

Latest commit

 

History

History
53 lines (37 loc) · 967 Bytes

File metadata and controls

53 lines (37 loc) · 967 Bytes

CLASS

TensorData

Contents

public class TensorData<T>

Contains tensor data information to be use for training/validation.

Properties

data

public var data: [T]

Tensor data as a one dimensional array

shape

public let shape: [Int]

Shape of the tensor

Methods

init(data:shape:)

public init(data: [T], shape: [Int]) throws

Initialize a tensor to be used for training/validation in SwiftSyft

  • Parameters:
    • data: tensor data as a 1D array. Must be a floating point type or an integer type
    • shape: an array of integers defining the shape of the tensor

Parameters

Name Description
data tensor data as a 1D array. Must be a floating point type or an integer type
shape an array of integers defining the shape of the tensor