diff --git a/src/TensorFlowNET.Core/Operations/Distributions/distribution.py.cs b/src/TensorFlowNET.Core/Operations/Distributions/distribution.py.cs index 16be7bfb..0ba62f88 100644 --- a/src/TensorFlowNET.Core/Operations/Distributions/distribution.py.cs +++ b/src/TensorFlowNET.Core/Operations/Distributions/distribution.py.cs @@ -64,12 +64,16 @@ namespace Tensorflow { return _log_prob(value); } +#pragma warning disable CS0168 // Variable is declared but never used catch (Exception e1) +#pragma warning restore CS0168 // Variable is declared but never used { try { return math_ops.log(_prob(value)); +#pragma warning disable CS0168 // Variable is declared but never used } catch (Exception e2) +#pragma warning restore CS0168 // Variable is declared but never used { throw new NotImplementedException(); } diff --git a/src/TensorFlowNET.Keras/Model.cs b/src/TensorFlowNET.Keras/Model.cs index 0eb7fbce..738c0488 100644 --- a/src/TensorFlowNET.Keras/Model.cs +++ b/src/TensorFlowNET.Keras/Model.cs @@ -50,7 +50,9 @@ namespace Tensorflow.Keras { return Flow; } +#pragma warning disable CS0168 // Variable is declared but never used catch (Exception ex) +#pragma warning restore CS0168 // Variable is declared but never used { return null; }