Run keras model uses .net

I tried convert tf.keras model to cntk, but this does not work for me. I used MMdnn: mmconvert -sf keras -iw genre_predictor.krs -df cntk -om genre_predictor.dnn But he outputs this message: TypeError: 'InputLayer' object is not iterable

I also try to convert keras to onnx, but i have no idea how i can run onnx model with negative dimension(at the input layer keras model have shape = (-1, 25000, 1), but onnxruntime in c# can't work with -1 dimension) With this code:

             var sess = new InferenceSession("genre_predictor.onnx");
             var inputsDimensions = sess.InputMetadata.Values.First(); // int {-1, 25000, 1}
             Tensor<float> t1 = new DenseTensor<float>(new float[25000], new int[] {1, 25000, 1});
             var inputs = new List<NamedOnnxValue>()
             {
                 NamedOnnxValue.CreateFromTensor<float>("first", t1)
             };
             sess.Run(inputs);
             using (var outputs = sess.Run(inputs))
             {
                 Console.WriteLine(outputs);
             }

I have this exception: Unhandled exception. Microsoft.ML.OnnxRuntime.OnnxRuntimeException: [ErrorCode:InvalidArgument] Invalid Feed Input Name:first

Microsoft.CNTK package also can't work with negative dimension. With this code:

var device = DeviceDescriptor.CPUDevice;
Function.Load("genre_predictor.onnx", device, ModelFormat.ONNX);

I have this exception: About to throw exception 'ConvertAxisToCNTKCppApi cannot convert index < 0 to axis' Unhandled exception. System.ApplicationException: ConvertAxisToCNTKCppApi cannot convert index < 0 to axis

I have no idea what I can do with this to run the keras model binary via .net. Pls help)

P.S. My keras model:

(800, 25000, 1)
(None, 25000, 1)
Model: "GenrePredictor"
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
conv1d (Conv1D)              (None, 24951, 64)         3264      
_________________________________________________________________
max_pooling1d (MaxPooling1D) (None, 2495, 64)          0         
_________________________________________________________________
conv1d_1 (Conv1D)            (None, 2446, 64)          204864    
_________________________________________________________________
max_pooling1d_1 (MaxPooling1 (None, 244, 64)           0         
_________________________________________________________________
flatten (Flatten)            (None, 15616)             0         
_________________________________________________________________
dense (Dense)                (None, 1024)              15991808  
_________________________________________________________________
dense_1 (Dense)              (None, 512)               524800    
_________________________________________________________________
dense_2 (Dense)              (None, 256)               131328    
_________________________________________________________________
dense_3 (Dense)              (None, 10)                2570      
=================================================================
Total params: 16,858,634
Trainable params: 16,858,634
Non-trainable params: 0