File size: 1,501 Bytes
b123280
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# TensorFlow.js Model

## Model Information
- Framework: TensorFlow.js
- Type: Deep Q-Network (DQN)
- Created by: IgnitionAI

## Model Format
This model is saved in TensorFlow.js format and can be loaded in two ways:

1. **LayersModel** (Default)
   - Better for fine-tuning and training
   - More flexible for model modifications
   - Higher memory usage
   - Slower inference

2. **GraphModel**
   - Optimized for inference only
   - Faster execution
   - Lower memory usage
   - Not suitable for training

## Usage
```javascript
import { loadModelFromHub } from '@ignitionai/backend-tfjs';

// Option 1: Load as LayersModel (for training/fine-tuning)
const layersModel = await loadModelFromHub(
  'salim4n/tfjs-dqn-test-1744654655889',
  'model/model.json',
  false // graphModel = false for LayersModel
);

// Option 2: Load as GraphModel (for inference only)
const graphModel = await loadModelFromHub(
  'salim4n/tfjs-dqn-test-1744654655889',
  'model/model.json',
  true // graphModel = true for GraphModel
);

// Run inference
const input = tf.tensor2d([[0.1, 0.2]]);
const output = model.predict(input);
```

## Features
- Automatic retry with exponential backoff
- Configurable retry attempts and delays
- Error handling and logging
- Support for both LayersModel and GraphModel

## Files
- `model.json`: Model architecture and configuration
- `weights.bin`: Model weights
- `README.md`: This documentation

## Repository
This model was uploaded via the IgnitionAI TensorFlow.js integration.