cureos / aforge

PCL version of AForge.NET Framework, https://code.google.com/p/aforge/
Other
125 stars 96 forks source link

ActivationNetwork.Save throws platform not supported exception #20

Open poleindraneel opened 8 years ago

poleindraneel commented 8 years ago

In neural networks, Save method of ActivationNetwork class, throws platform not supported exception. image

anders9ustafsson commented 8 years ago

This sounds like you have forgotten to explicitly include the Shim NuGet package in your application. Explicitly add Shim via NuGet to your application, and I think your problem will go away.

anders9ustafsson commented 8 years ago

@poleindraneel Were you able to resolve this issue yourself?

poleindraneel commented 8 years ago

Hi @anders9ustafsson , Well, Shim only provides not implemented exception for this method. So basically this method is not implemented on .NET Core version of the library. We forked Portable Aforge at https://github.com/daenetCorporation/, and implemented these methods on our own. We will soon be sending pull request for this.

anders9ustafsson commented 8 years ago

@poleindraneel OK, I see, so you are trying this on .NET Core with a PCL library instance? Which PCL profile are you using, and which .NET Standard level are you targeting?

I have not come so far yet as to natively support .NET Core in Shim. Should maybe consider to do this. On the other hand the .NET Standard API may make it simpler to support e.g. the Accord code "out-of-the-box" without the Shim workaround. We'll see what the future may bring :-)

poleindraneel commented 8 years ago

@anders9ustafsson So we are actually targeting it to .NET Core 1.0 i.e "NETStandard.Library": "1.6.0" i.e .NET Standard 4.6.3. We have implemented serialization and deserialization for neuro to save and load the neural network in .NET Core environment. (Our aim it to use AForge on devices such as Raspberry Pi and HoloLens :)) I believe this will be easier for you when you plan to support .NET Core in future. You can have a look at our changes in the forked repository however I am not yet 100% sure that all the changes are checked in. I will ask my teammate to check in everything and send a pull request.