gpt4 book ai didi

c# - Unity中的Encog dll?

转载 作者:行者123 更新时间:2023-11-30 17:48:00 24 4
gpt4 key购买 nike

我想将 Encog 实现到 Unity。当我将dll放入 Assets 时,没有发生错误。我什至可以毫无错误地创建新的神经网络。

当我将 XOR 示例粘贴到脚本时,出现如下所示的错误。我在谷歌上搜索了它与 Encog 使用 Unity 单声道行为中未涵盖的 C# 部分有关的某种相关信息。

有人说我应该使用 net framework 3.5 构建的 dll,但是当我尝试在 visual basic 中加载解决方案文件时,我得到另一个类似的错误:

Error   1   The type or namespace name 'Tasks' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?)  C:\Programs\Unity\ncog\encog-dotnet-core-3.2.0\encog-core-cs\Util\Concurrency\Job\ConcurrentJob.cs  24  24  encog-core-cs

我尝试修改 encog 源代码中包含的 build.bat,以便它使用 3.5 框架的路径:C:\Windows\Microsoft.NET\Framework64\v3.5\msbuild(编译时没有错误/警告)但是当我尝试统一使用这个 dll 时,我得到了与正常分发在 encog 站点上的 dll 相同的错误。

尝试使用 XOR 保护示例脚本时出现统一错误

Internal compiler error. See the console log for more information. output was:
Unhandled Exception: System.TypeLoadException: Could not load type 'Encog.ML.Train.BasicTraining' from assembly 'encog-core-cs, Version=3.2.0.0, Culture=neutral, PublicKeyToken=3e882172b12155d4'.

at (wrapper managed-to-native) System.MonoType:GetMethodsByName (string,System.Reflection.BindingFlags,bool,System.Type)

at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] in <filename unknown>:0

at Mono.CSharp.MemberCache.AddMethods (BindingFlags bf, System.Type type) [0x00000] in <filename unknown>:0

at Mono.CSharp.MemberCache.AddMethods (System.Type type) [0x00000] in <filename unknown>:0

at Mono.CSharp.MemberCache..ctor (IMemberContainer container) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeHandle..ctor (System.Type type) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeManager.LookupMemberCache (System.Type t) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeHandle..ctor (System.Type type) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeManager.LookupMemberCache (System.Type t) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeHandle..ctor (System.Type type) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeManager.MemberLookup_FindMembers (System.Type t, MemberTypes mt, BindingFlags bf, System.String name, System.Boolean& used_cache) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeManager.RealMemberLookup (System.Type invocation_type, System.Type qualifier_type, System.Type queried_type, MemberTypes mt, BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in <filename unknown>:0

at Mono.CSharp.TypeManager.MemberLookup (System.Type invocation_type, System.Type qualifier_type, System.Type queried_type, MemberTypes mt, BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in <filename unknown>:0

at Mono.CSharp.Expression.MemberLookup (Mono.CSharp.CompilerContext ctx, System.Type container_type, System.Type qualifier_type, System.Type queried_type, System.String name, MemberTypes mt, BindingFlags bf, Location loc) [0x00000] in <filename unknown>:0

at Mono.CSharp.Expression.MemberLookupFinal (Mono.CSharp.ResolveContext ec, System.Type qualifier_type, System.Type queried_type, System.String name, MemberTypes mt, BindingFlags bf, Location loc) [0x00000] in <filename unknown>:0

at Mono.CSharp.New.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0

at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.Assign.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.SimpleAssign.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in <filename unknown>:0

at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in <filename unknown>:0

at Mono.CSharp.ToplevelBlock.Resolve (Mono.CSharp.FlowBranching parent, Mono.CSharp.BlockContext rc, Mono.CSharp.ParametersCompiled ip, IMethodData md) [0x00000] in <filename unknown>:0

最佳答案

这似乎是 DLL 支持的常见问题。我从试图将 Encog 连接到 Ninjatrader 的人那里看到了类似的问题。当前版本的 Ninjatrader 支持过时(落后几个版本)的 .Net 版本,不支持 LINQ。我假设 Unity3D 有类似的问题。我不是 Ninjatrader 或 Unity3D 的活跃开发人员。我真的不想同时支持 Ninjatrader 和 Unity3D 版本(一天只有这么多小时)。然而,更高版本的 .Net 支持 LINQ 中的一些非常有用的功能,以及非常高级的腭化功能。

我想一个答案是创建一个非常基本的非 LINQ/非并行,它与过去 10 年内的任何 .Net 版本兼容。

关于c# - Unity中的Encog dll?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23865859/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com