[Deep learning] Gradient Descent Optimizer

이미지
https://icim.nims.re.kr/post/easyMath/70 알기 쉬운 산업수학 알기 쉬운 산업수학 Gradient Descent Optimizer 2017년 12월 13일(수) | 김민중 URL  (1) 주어진 목적함수  f f 의 최솟값(minimum)을 찾아가는 알고리즘으로 다음과 같은 방식으로 최솟값을 찾아간다. 초기값  x 0 x 0 을 임의로 설정, 적당한 Learning rate  α α  설정 n ≥ 0 n ≥ 0 인 정수에 대해서  x n + 1 x n + 1 은 다음과 같이 정의한다. x n + 1 : = x n − α ⋅ ∇ f ( x n ) x n + 1 := x n − α ⋅ ∇ f ( x n ) 주의사항 함수 f f 의 모양이 convex가 아닌 경우 global minimum이 아닌 local minimum으로  x n x n 이 수렴할 가능성이 있다. Learning rate  α α  값이 큰 경우 최솟값으로  x n x n 이 수렴하는 것이 아니라 발산할 수 있다. Learning rate  α α  값이 작은 경우 수렴하는 속도가 지나치게 느릴 수 있다. 방정식  2 ⋅ x = 10 2 ⋅ x = 10  의 근을 Gradient Descent를 이용해서 찾아보자. 목적함수  f ( x ) : = ( 10 − 2 x ) 2 f ( x ) := ( 10 − 2 x ) 2 으로 설정하겠다( f f 의 최솟값인 0이 되게 하는  x x 값이 우리가 원하는 방정식의 근이다). 초기값  x 0 = 0 x 0 = 0 , Learning rate  α = 0.05 α = 0.05 으로 설정 f ′ ( x ) = 4 ( 2 x − 10 ) f ′ ( x ) = 4 ( 2 x − 10 ) 이므로  x 1 x 1 은 다음과 같이 구할 수 있다. x 1 = x 0 − α ⋅ f ′ ( x 0 ) = 0 − 0.05 ⋅ ( − 40 ) = 2 x

[Unity3D] UNetWeaver error: Exception :System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.

< Error Message >
UNetWeaver error: Exception :System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0 
at Mono.Cecil.PE.ImageReader.ReadImageFrom (System.IO.Stream stream) [0x00000] in <filename unknown>:0 
at Mono.Cecil.ModuleDefinition.ReadModule (System.IO.Stream stream, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
at Mono.Cecil.AssemblyDefinition.ReadAssembly (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
at Unity.UNetWeaver.Weaver.Weave (System.String assName, IEnumerable`1 dependencies, IAssemblyResolver assemblyResolver, System.String unityEngineDLLPath, System.String unityUNetDLLPath, System.String outputDir) [0x00041] in /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1715 
at Unity.UNetWeaver.Weaver.WeaveAssemblies (IEnumerable`1 assemblies, IEnumerable`1 dependencies, IAssemblyResolver assemblyResolver, System.String outputDir, System.String unityEngineDLLPath, System.String unityUNetDLLPath) [0x0006e] in /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1843 
UnityEngine.Debug:LogError(Object)
Unity.UNetWeaver.Log:Error(String) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:20)
Unity.UNetWeaver.Weaver:WeaveAssemblies(IEnumerable`1, IEnumerable`1, IAssemblyResolver, String, String, String) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1851)
Unity.UNetWeaver.Program:Process(String, String, String, String[], String[], IAssemblyResolver, Action`1, Action`1) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:34)

UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)




<Solution>

This error is caused by source code location.
If your source code is located in external storage then you will met this error message.

Move it to internal storage.




<Reference>

https://forum.unity3d.com/threads/cant-compile-badimageformatexception.212371/

댓글

이 블로그의 인기 게시물

@import' when modules are disabled

MagicaVoxel black screen

[Iphone][build error] pngcrush caught libpng error: PNG unsigned integer out of range.