-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtrainMagnitudeNetwork.py
More file actions
17 lines (13 loc) · 950 Bytes
/
trainMagnitudeNetwork.py
File metadata and controls
17 lines (13 loc) · 950 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.magPreAndPostProcessor import MagPreAndPostProcessor
architecturesParametersFile = "magnitude_network_parameters.pkl"
sessionsName = "magnitude_network"
with open(architecturesParametersFile, 'rb') as savedFile:
Context_Encoder_parameters = pickle.load(savedFile)
aContextEncoderArchitecture = ContextEncoderArchitecture(*Context_Encoder_parameters.architectureParameters())
aPreProcessor = MagPreAndPostProcessor(*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)