Closed xl233 closed 4 years ago
Hi @xl233,
Thanks for using SharpLearning, I am glad you find it useful.
I am not familiar with the Fody/Costura
tool. Can you elaborate a bit on what you are trying to achieve?
Is the problem related to loading a RegressionGradientBoostModel
using the GenericXmlDataContractSerializer
?
If that is the case, you might have to add the RegressionGradientBoostModel
as a known type:
var knownTypes = new[]
{
typeof(RegressionGradientBoostModel),
};
var serializer = new GenericXmlDataContractSerializer(knownTypes);
best regards Mads
Thank you so much!!! This immediately solved my problem. Really appreciate it!
How would you like us to cite you? Thank you!
Thank you so much for developing this package. It's been working smoothly on my computer, but I might need some help on generating a dll file for others to run on their computers. I tried using this nuget package https://github.com/Fody/Costura/graphs/contributors to compile sharplearning dlls into the project dll and adding all sharplearning xml files to embedded resources. But I keep getting the same error saying that "Element 'http://schemas.microsoft.com/2003/10/Serialization/:anyType' contains data from a type that maps to the name 'SharpLearning.GradientBoost.Models:RegressionGradientBoostModel'. The deserializer has no knowledge of any type that maps to this name. " I was wondering where the deserializer knowledge is stored and how do I add them to the project dll file. Any comment or suggestion is appreciated. Thank you!