CNN class

Compact CNN wrapper (ANN-backed)

This module implements a pragmatic, testable CNN-like interface by extracting simple, local statistics from small images and delegating the parameterized classifier head to the project's ANN MLP. The implementation favors clarity and reproducibility rather than raw performance. It is suitable for unit tests, examples, and educational experiments.

Input contract:

  • X: batch of images as List of shape (n x h x w x c)
  • Y: targets (n x k)

Constructors

CNN({required int height, required int width, required int channels, required List<int> headLayers, int? seed})

Properties

channels int
final
hashCode int
The hash code for this object.
no setterinherited
final
height int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
width int
final

Methods

fit(List<List<List<List<double>>>> X, List<List<double>> Y, {int? batchSize, bool verbose = false}) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
predict(List<List<List<List<double>>>> X) List<List<double>>
toJson() String
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromJson(String s, {int? seed}) CNN
fromMap(Map<String, dynamic> m, {int? seed}) CNN