I'm new to cntk and python. I have done machine learning in c# over the years with various libraries.
To help me learn cntk and python I doing a simple classification project with UCI wine data set. Right now I am only doing one hidden layer, I do plan to add more hidden layers after I get one hidden layer working.
I am having problems with creating a hidden Dense layer with dtype of numpy.float64. I know float32 is faster. I want to have my underlining data as float64 because of future projects that is a requirement.
I have searched the internet for help with no avail for answers. The last thing I have tried is creating the inputs with dtype=numpy.float64 and passing inputs to Dense, but that did not work either. In the past I have tried "with cntk.layers.default_options(dtype=numpy.float64)" inside a function but it does not accept numpy.float64 with or without a name. I have also tried calling update_signature(numpy.float64) on what is returned from Dense and I get the same error. I would tell you other things I have tried, but I honestly don't remember right now.
Here is my latest code:
inputsCount = 11
classesCount = 2
inputs = cntk.input_variable(shape=(inputsCount), dtype=numpy.float64)
model = cntk.layers.Dense(classesCount, activation=None)(inputs)
This is the error I get with it:
ValueError: Primitive op 'Times' passed operands 'Parameter('W', [], [? x 2]), Placeholder('Placeholder135', [#], [11])' with different DataTypes 'Float' and 'Double'.
Can you try this?
inputsCount = 11
classesCount = 2
with cntk.default_options(dtype=numpy.float64):
inputs = cntk.input_variable(shape=(inputsCount))
model = cntk.layers.Dense(classesCount, activation=None)(inputs)