-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_script.py
More file actions
33 lines (26 loc) · 865 Bytes
/
run_script.py
File metadata and controls
33 lines (26 loc) · 865 Bytes
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
import tensorflow as tf
import numpy as np
import Functions as fn
import importlib
importlib.reload(fn)
# testdatanorm = np.random.rand(100, 16, 100)
# testlabelsnorm = np.random.rand(100, 100)
checkpointing_config = tf.estimator.RunConfig(
save_checkpoints_secs=20 * 60, # Save checkpoints every 20 minutes.
keep_checkpoint_max=2, # Retain the 10 most recent checkpoints.
)
classifier = tf.estimator.Estimator(
model_fn=fn.CNNmodel,
model_dir='Model_mp_1',
config=checkpointing_config,
params={
# 'feature_columns': the_feature_column,
# Layers.
'NUM_COOKIES': 16,
'COOKIE_DENSE': [100, 50, 10],
'CNN': [[32, 10], [32, 10]], # Convolutional layers
'POOL': 80, # Global Pooling Label
'DENSE': [160, 200, 200], # Dense layers
'OUT': 200 # output dimensions
}
)