mcode-neural 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcode_neural/__init__.py +183 -0
- mcode_neural/data.py +773 -0
- mcode_neural/fonts/MicroCODE-Mono/MicroCODE-Mono.ttf +0 -0
- mcode_neural/fonts/MicroCODE-Mono/OFL.txt +128 -0
- mcode_neural/fonts/RobotoMono/OFL.txt +93 -0
- mcode_neural/fonts/RobotoMono/RobotoMono-Bold.ttf +0 -0
- mcode_neural/fonts/RobotoMono/RobotoMono-Bold.woff2 +0 -0
- mcode_neural/fonts/RobotoMono/RobotoMono-Regular.ttf +0 -0
- mcode_neural/fonts/RobotoMono/RobotoMono-Regular.woff2 +0 -0
- mcode_neural/layer.py +589 -0
- mcode_neural/model.py +2092 -0
- mcode_neural/network.py +447 -0
- mcode_neural/neuron.py +233 -0
- mcode_neural/predict.py +360 -0
- mcode_neural/show.py +6076 -0
- mcode_neural/train.py +756 -0
- mcode_neural-0.5.0.dist-info/METADATA +767 -0
- mcode_neural-0.5.0.dist-info/RECORD +22 -0
- mcode_neural-0.5.0.dist-info/WHEEL +4 -0
- mcode_neural-0.5.0.dist-info/licenses/LICENSE +21 -0
- mcode_neural-0.5.0.dist-info/licenses/src/mcode_neural/fonts/MicroCODE-Mono/OFL.txt +128 -0
- mcode_neural-0.5.0.dist-info/licenses/src/mcode_neural/fonts/RobotoMono/OFL.txt +93 -0
mcode_neural/__init__.py
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"""MicroCODE's 'mcode-neural' package -- readable display of PyTorch tensors, and single neuron and multi-layer models, with views of their internals."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import version
|
|
4
|
+
|
|
5
|
+
from .show import (
|
|
6
|
+
show_2d_scores,
|
|
7
|
+
show_3d_results,
|
|
8
|
+
show_3d_slider,
|
|
9
|
+
show_confusion_matrix,
|
|
10
|
+
show_largest_errors,
|
|
11
|
+
show_misclassified,
|
|
12
|
+
show_model_trace,
|
|
13
|
+
show_model_metrics,
|
|
14
|
+
show_neuron_slider,
|
|
15
|
+
show_neuron_trace,
|
|
16
|
+
show_tensor,
|
|
17
|
+
show_training_curves,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
from .show import show_model_comparison
|
|
21
|
+
|
|
22
|
+
from .show import show_latent_space, show_reconstructions
|
|
23
|
+
|
|
24
|
+
from .show import show_3d_latent_space
|
|
25
|
+
|
|
26
|
+
from .show import show_samples
|
|
27
|
+
|
|
28
|
+
from .show import show_model_history
|
|
29
|
+
|
|
30
|
+
from .show import show_layer_internals, show_model_internals, show_neuron_internals
|
|
31
|
+
|
|
32
|
+
from .show import show_network_internals
|
|
33
|
+
|
|
34
|
+
from .show import show_layer_trace
|
|
35
|
+
|
|
36
|
+
from .show import show_model
|
|
37
|
+
|
|
38
|
+
from .show import show_mode
|
|
39
|
+
|
|
40
|
+
from .data import data_frame_split, data_loaders, data_subset_split
|
|
41
|
+
|
|
42
|
+
from .data import data_frame_phase
|
|
43
|
+
|
|
44
|
+
from .data import data_dataset_split
|
|
45
|
+
|
|
46
|
+
from .data import data_labels
|
|
47
|
+
|
|
48
|
+
from .data import data_classes
|
|
49
|
+
|
|
50
|
+
from .data import DATA_KINDS, Data
|
|
51
|
+
from .layer import LAYER_KINDS
|
|
52
|
+
from .neuron import NEURON_KINDS
|
|
53
|
+
|
|
54
|
+
from .layer import Layer
|
|
55
|
+
from .neuron import Neuron
|
|
56
|
+
|
|
57
|
+
from .network import NETWORK_KINDS, Network
|
|
58
|
+
|
|
59
|
+
from .model import Model, model_load, model_save
|
|
60
|
+
|
|
61
|
+
from .model import MODEL_KINDS
|
|
62
|
+
|
|
63
|
+
from .model import model_test
|
|
64
|
+
|
|
65
|
+
from .model import model_device
|
|
66
|
+
|
|
67
|
+
from .model import model_freeze, model_replace_output, model_unfreeze
|
|
68
|
+
|
|
69
|
+
from .model import (
|
|
70
|
+
BipolarClassifierNeuronModel,
|
|
71
|
+
LogisticClassifierNeuronModel,
|
|
72
|
+
NeuronModel,
|
|
73
|
+
RegressorNeuronModel,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
from .model import (
|
|
77
|
+
BinaryClassificationModel,
|
|
78
|
+
ClassificationModel,
|
|
79
|
+
FeedforwardModel,
|
|
80
|
+
RegressionModel,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
from .model import AUTOENCODER_OUTPUTS, AutoencoderModel
|
|
84
|
+
|
|
85
|
+
from .model import (
|
|
86
|
+
ExternalAutoencoderModel,
|
|
87
|
+
ExternalClassificationModel,
|
|
88
|
+
ExternalRegressionModel,
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
from .train import train_model
|
|
92
|
+
|
|
93
|
+
from .neuron import NeuronOptimizer
|
|
94
|
+
|
|
95
|
+
from .train import train_probe
|
|
96
|
+
|
|
97
|
+
from .predict import predict_classes, predict_values
|
|
98
|
+
|
|
99
|
+
from .predict import predict_metrics
|
|
100
|
+
|
|
101
|
+
__version__ = version('mcode-neural')
|
|
102
|
+
|
|
103
|
+
__all__ = [
|
|
104
|
+
# show.py Function
|
|
105
|
+
'show_tensor',
|
|
106
|
+
'show_mode',
|
|
107
|
+
'show_model_trace',
|
|
108
|
+
'show_model',
|
|
109
|
+
'show_model_internals',
|
|
110
|
+
'show_network_internals',
|
|
111
|
+
'show_layer_internals',
|
|
112
|
+
'show_neuron_internals',
|
|
113
|
+
'show_layer_trace',
|
|
114
|
+
'show_neuron_trace',
|
|
115
|
+
'show_neuron_slider',
|
|
116
|
+
'show_misclassified',
|
|
117
|
+
'show_confusion_matrix',
|
|
118
|
+
'show_2d_scores',
|
|
119
|
+
'show_3d_results',
|
|
120
|
+
'show_3d_slider',
|
|
121
|
+
'show_model_metrics',
|
|
122
|
+
'show_largest_errors',
|
|
123
|
+
'show_training_curves',
|
|
124
|
+
'show_model_comparison',
|
|
125
|
+
'show_latent_space',
|
|
126
|
+
'show_3d_latent_space',
|
|
127
|
+
'show_reconstructions',
|
|
128
|
+
'show_samples',
|
|
129
|
+
'show_model_history',
|
|
130
|
+
# data.py Function
|
|
131
|
+
'data_subset_split',
|
|
132
|
+
'data_frame_split',
|
|
133
|
+
'data_loaders',
|
|
134
|
+
'data_frame_phase',
|
|
135
|
+
'data_dataset_split',
|
|
136
|
+
'data_labels',
|
|
137
|
+
'data_classes',
|
|
138
|
+
# data.py Class and Table
|
|
139
|
+
'Data',
|
|
140
|
+
'DATA_KINDS',
|
|
141
|
+
# train.py Function
|
|
142
|
+
'train_model',
|
|
143
|
+
'train_probe',
|
|
144
|
+
# predict.py Function
|
|
145
|
+
'predict_classes',
|
|
146
|
+
'predict_values',
|
|
147
|
+
'predict_metrics',
|
|
148
|
+
# model.py Classes and Functions
|
|
149
|
+
'Model',
|
|
150
|
+
'MODEL_KINDS',
|
|
151
|
+
'model_save',
|
|
152
|
+
'model_load',
|
|
153
|
+
'model_test',
|
|
154
|
+
'model_device',
|
|
155
|
+
'model_freeze',
|
|
156
|
+
'model_unfreeze',
|
|
157
|
+
'model_replace_output',
|
|
158
|
+
# neuron.py and layer.py Tables
|
|
159
|
+
'NEURON_KINDS',
|
|
160
|
+
'LAYER_KINDS',
|
|
161
|
+
# neuron.py and layer.py Classes
|
|
162
|
+
'Neuron',
|
|
163
|
+
'Layer',
|
|
164
|
+
'NeuronOptimizer',
|
|
165
|
+
# network.py Class and Table
|
|
166
|
+
'Network',
|
|
167
|
+
'NETWORK_KINDS',
|
|
168
|
+
# model.py Neuron Classes
|
|
169
|
+
'NeuronModel',
|
|
170
|
+
'RegressorNeuronModel',
|
|
171
|
+
'LogisticClassifierNeuronModel',
|
|
172
|
+
'BipolarClassifierNeuronModel',
|
|
173
|
+
# model.py Network Classes
|
|
174
|
+
'FeedforwardModel',
|
|
175
|
+
'ClassificationModel',
|
|
176
|
+
'BinaryClassificationModel',
|
|
177
|
+
'RegressionModel',
|
|
178
|
+
'AutoencoderModel',
|
|
179
|
+
'AUTOENCODER_OUTPUTS',
|
|
180
|
+
'ExternalClassificationModel',
|
|
181
|
+
'ExternalRegressionModel',
|
|
182
|
+
'ExternalAutoencoderModel',
|
|
183
|
+
]
|