-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtrainComplexNetwork.py
More file actions
17 lines (13 loc) · 937 Bytes
/
trainComplexNetwork.py
File metadata and controls
17 lines (13 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import pickle
from architecture.contextEncoderArchitecture import ContextEncoderArchitecture
from system.contextEncoderSystem import ContextEncoderSystem
from system.preAndPostProcessor import PreAndPostProcessor
architecturesParametersFile = "complex_network_parameters.pkl"
sessionsName = "complex_network"
with open(architecturesParametersFile, 'rb') as savedFile:
Context_Encoder_parameters = pickle.load(savedFile)
aContextEncoderArchitecture = ContextEncoderArchitecture(*Context_Encoder_parameters.architectureParameters())
aPreProcessor = PreAndPostProcessor(*Context_Encoder_parameters.preProcessorParameters())
aContextEncoderSystem = ContextEncoderSystem(aContextEncoderArchitecture, Context_Encoder_parameters.batchSize(),
aPreProcessor, sessionsName)
aContextEncoderSystem.train("nsynth_train_w5120_g1024_h512.tfrecords", "nsynth_valid_w5120_g1024_h512.tfrecords", 1e-3)