graph_factory
GraphFactory
Source code in src/artificial_artwork/style_model/graph_factory.py
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 |
|
create(config, model_design)
classmethod
Create a model for the purpose of 'painting'/generating a picture.
Creates a Deep Learning Neural Network with most layers having weights (aka model parameters) with values extracted from a pre-trained model (ie another neural network trained on an image dataset suitably).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config |
[type]
|
[description] |
required |
model_parameters |
[type]
|
[description]. Defaults to None. |
required |
Returns:
Type | Description |
---|---|
Dict[str, Any]
|
Dict[str, Any]: [description] |
Source code in src/artificial_artwork/style_model/graph_factory.py
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 |
|
LayerMaker
Automatically create the NST Style Computational Graph (Neural Net)
Automatically builds the NST Style Network as a Computational Graph of Tensor Operations, given a list of layer_ids (ie names) and a reporter (ie a ModelReporter instance) that can provide the weights for each layer_id.
Automatically creates relu or avg pooling layers, depending on the layer_id.
Source code in src/artificial_artwork/style_model/graph_factory.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|