Structures
The following structures are available globally.
-
The helper to collect data from the given Envs.
The policy is intentional to be flexible as a simple closure. We collect both the action and state data the closure provides. There may be some type conversions for what the Env expects and what the policy provides, thus, need to specify both. To make this easier to use, the placeholder type would be useful:
See moreCollector<Float, (), _, _>(envs: envs) { ... }
Declaration
Swift
public struct Collector<Element: TensorNumeric, StateType, EnvType: Env, EnvElement: TensorNumeric> where EnvType.ObsType == Tensor<EnvElement>, EnvType.ActType == Tensor<EnvElement>
-
Declaration
Swift
public struct CollectedData<Element, StateType>
-
A pandas-inspired dataframe. Dataframe is a tabular data representation. This particular Dataframe implementation is most useful to implement data feeder pipeline. You need some transformations so some text or images can be transformed into tensors for a model to consume. Dataframe can be used to implement that pipeline.
See moreDeclaration
Swift
public struct DataFrame
-
Declaration
Swift
public struct DataSeriesIterator<S> : IteratorProtocol where S : DataSeries
-
Declaration
Swift
public struct GradScaler
-
Hint are parameters to these operations that changes shape from input to output. It given proper stride / padding parameters for these operations.
See moreDeclaration
Swift
public struct Hint
-
Declaration
Swift
@resultBuilder public struct Sequential
-
Basic tensor type.
See moreDeclaration
Swift
public struct Tensor<Element> : AnyTensor where Element : TensorNumeric
extension Tensor: ExpressibleByArrayLiteral
extension Tensor: CustomStringConvertible
extension Tensor: CustomDebugStringConvertible
extension Tensor: PythonConvertible where Element: NumpyScalarCompatible
-
A simple helper to compute numerical statistic properties (mean and standard deviations) from a given collection.
See moreDeclaration
Swift
public struct NumericalStatistics
-
Declaration
Swift
public struct PPO
-
Declaration
Swift
public struct RunningMeanStd<TensorElement>
-
Declaration
Swift
public struct SFMT : RandomNumberGenerator
-
A writer for writing model execution summaries to a tensorboard-readable file; the summaries include scalars for logging statistics, graphs for visualizing model etc.
See moreDeclaration
Swift
public struct SummaryWriter
-
Tensor shape (or dimensions)
See moreDeclaration
Swift
public struct TensorShape
extension TensorShape: ExpressibleByArrayLiteral
extension TensorShape: CustomStringConvertible
extension TensorShape: Equatable
extension TensorShape: RandomAccessCollection