DonutConfig constructor

const DonutConfig({
  1. List<int> inputSize = const [2560, 1920],
  2. bool alignLongAxis = true,
  3. int windowSize = 10,
  4. List<int> encoderLayer = const [2, 2, 14, 2],
  5. int decoderLayer = 4,
  6. int maxPositionEmbeddings = 1536,
  7. int maxLength = 1536,
  8. int encoderEmbedDim = 128,
  9. List<int> encoderNumHeads = const [4, 8, 16, 32],
  10. int patchSize = 4,
  11. int decoderEmbedDim = 1024,
  12. int decoderFfnDim = 4096,
  13. int decoderNumHeads = 16,
  14. int vocabSize = 57525,
  15. String nameOrPath = '',
})

Implementation

const DonutConfig({
  this.inputSize = const [2560, 1920],
  this.alignLongAxis = true,
  this.windowSize = 10,
  this.encoderLayer = const [2, 2, 14, 2],
  this.decoderLayer = 4,
  this.maxPositionEmbeddings = 1536,
  this.maxLength = 1536,
  this.encoderEmbedDim = 128,
  this.encoderNumHeads = const [4, 8, 16, 32],
  this.patchSize = 4,
  this.decoderEmbedDim = 1024,
  this.decoderFfnDim = 4096,
  this.decoderNumHeads = 16,
  this.vocabSize = 57525,
  this.nameOrPath = '',
});