5월, 2017의 게시물 표시

[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 )...

[English] Having that said

<Expression> “Having said that” <Meaning> They are both mostly used in a context in which you are about to state a paradox, or contradiction, e.g.: John failed all his A levels. But  having said that  he is highly literate in matters of IT and has found a well paid job immediately. England are underdogs for their opening World Cup fixture against Italy.  That being said  it is not unknown for the Italians to lose an opening match against ranked outsiders, such as when they were beaten by Ireland in New York in 1994. Both of them mean, and could easily be replaced with  'Notwithstanding that...' <Suggestion> Don't try to use "that being said", "having said that" or any other variation of this faddish hackneyed phrase. Instead use "h owever " or "but". <Reference> https://english.stackexchange.com/questions/160616/having-said-that-vs-that-being-said https://english.stackexchange.com/qu...

[unity3d] Assets/Editor//SFCamEffect.js(92,36): BCE0004: Ambiguous reference 'preview': CameraMotionBlurEditor.preview, UnityEditor.Editor.preview.

<Error Message> Ambiguous reference 'preview': <Solution> var preview : SerializedProperty; to var preview_ : SerializedProperty; <Reference> http://answers.unity3d.com/questions/918410/ambiguous-reference-preview.html

[Ios][Xcode] if(![_context presentRenderbuffer:GL_RENDERBUFFER])-------EXC_BAD_ACCESS

<Error Message> if(![_context presentRenderbuffer:GL_RENDERBUFFER]) -------EXC_BAD_ACCESS <Solution> - ( void ) applicationDidEnterBackground :( UIApplication *) application { [[ CCDirector sharedDirector ] pause ]; [[ CCDirector sharedDirector ] stopAnimation ]; // Add } - ( void ) applicationWillEnterForeground :( UIApplication *) application { [[ CCDirector sharedDirector ] resume ]; [[ CCDirector sharedDirector ] startAnimation ]; // Add } <Reference> https://stackoverflow.com/questions/19240740/exc-bad-access-using-ccglview-when-home-pressed

[windows][diskpart] How to delete linux partition on windows.

이미지
How to delete linux partition on windows. 1. Run cmd.exe with administaror priviliege.  ( wnd key -> type in cmd -> ctrl + shift +enter ) 2. Type in "diskpart" on cmd window. 3. Type in "list disk" to find target disk. 4. Type in "select disk + n [ which is disk number]"    for example : select disk 2 5. check the disk detail to confirm again. ( "detail disk") 6. Type in "clean" to delete all partition on the disk. 7. Type in "exit" <Reference>

[Ios][Xcode] An error was encountered while attempting to communicate with this device. (The service is invalid.)

<Error Message> An error was encountered while attempting to communicate with this device. (The service is invalid.) Please try rebooting and reconnecting the device. (0xE8000022). <Solution> Restart your iphone. <Reference> https://stackoverflow.com/questions/2160299/error-the-service-is-invalid

[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.Strin...

[Unity3d] android sdk setting

<Finding android sdk path for unity3d in OSX> Step 1. Open Finder Step 2. Right click. Step 3. Select View Options Step 4. Click Show Library Folder Step 5. Follow the normal instructions for locating the Android SDK . <--- Use this path <Reference> https://forum.unity3d.com/threads/os-x-remember-to-install-the-android-sdk-via-the-sdk-manager-not-android-studio.288419/

[IOS][XCODE] 'wantsFullScreenLayout' is deprecated: first deprecated in iOS 7.0

<Warning Message> 'wantsFullScreenLayout' is deprecated: first deprecated in iOS 7.0 <Solution> wantsFullScreenLayout -> extendedLayoutIncludesOpaqueBars <Reference> http://stackoverflow.com/questions/19190876/need-wantsfullscreenlayout-behavior-with-non-translucent-bars-on-ios-7

Add "Firebase" to a project.

이미지
<With cocoapods> 1. In your xcode project folder, open a terminal and type in "pod init" and enter. 2. It will create a "Podfile" file. 3. Add "pod 'Firebase/Core' 4. In terminal, type in "pod install" and enter. 5. It will create a $(projectname). xcworkspace. 6. Open the project file. 7. Download " GoogleService-Info.plist" from  here  and add to your project. 8. Inherited calss from  UIApplicationDelegate  add @import Firebase; 9. In application:didFinishLaunchingWithOptions: method add [FIRApp configure]; <For old project> 1. If you met a error message after type in "pod install" in terminal window. Then you should change "Development Target" in general tab. ( at least v8.0 ) 2. After 'pod install' some warning message appear then follow the guide. [!] Please close any current Xcode sessions and use `SFMessanger.xcworkspace` for this project from now o...

[IOS][Xcode] Itunes Account creation not allowed The Apple ID cannot be used with the iTunes store at this time. Please try again later.

<Error Messsage> Itunes Account creation not allowed The Apple ID cannot be used with the iTunes store at this time. Please try again later. <Solution> The apple id is sandbox id. So you can't use it in iphone. It can be used for test IAP. <Reference> http://stackoverflow.com/questions/38266084/itunes-account-creation-not-allowed-when-trying-to-test-in-app-purchases

[Ios][Xcode] Revmob relation frameworks.

To use revmob import below frameworks. SystemConfiguration.framework StoreKit.framework MediaPlayer.framework CoreLocation.framework AVFoundation.framework AdSupport.framework -------- Security.framework <Reference> https://www.revmobmobileadnetwork.com/home/sdk/ios/full-guide#configuration http://sunggukim.blogspot.kr/2017/05/iosxcode-secpolicycreatessl-referenced.html

[Ios][Xcode] neon_matrix_impl.c:64:15: Unknown register name 'q0' in asm

<Error Message> neon_matrix_impl.c:64:15: Unknown register name 'q0' in asm <Solution> Replace #if defined(__ARM_NEON__) to #if defined(_ARM_ARCH_7) <Reference> http://stackoverflow.com/questions/19634756/error-when-creating-an-archive-of-my-cocos2d-app

[Ios][Xcode] Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait' in bundle 'com.hunutilshunutillitics.monsterfly'."

이미지
When i archive a source code with xcode, it says that.... <Error Message> Invalid Bundle. iPad Multitasking support requires these orientations: 'UIInterfaceOrientationPortrait,UIInterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'. Found 'UIInterfaceOrientationPortrait' in bundle 'com.hunutilshunutillitics.monsterfly'." <Solution> It  is the same solution. 1. Add "UIRequiresFullScreen" to Yes in Info.plist 2. Target -> General -> Check  "Requires full screen" <Reference> For 1> For 2>

[Ios][Xcode] Upgrade old admob to up to date sdk

이미지
<Upgrade admob sdk> 1. Remove old framework with source. 2. Add new sdk to framework. 3. There are several error message when you build your source. *  #import "GADBannerView.h" -->  #import <GoogleMobileAds/GoogleMobileAds.h> * "_CVOpenGLESTextureCacheCreateTextureFromImage", referenced from:   ---> add following framework to your link framework           * CoreMedia , CoreVideo, GLKit *   "_OBJC_CLASS_$_CMMotionManager", referenced from: ---> * Add CoreMotion framework. <Reference>

Upgrade old chartboost sdk to up-to-date library

<Problem> Upgrade old chartboost sdk to new one. <Solution> 1. Remove old one from source ( source and framework ) 2. Add new sdk to framework. 3. Modify several things. ( but in my case just this ) * import "Chartboost.h" will become #import "Chartboost/Chartboost.h" * [Chartboost sharedChartboost] are now changed to Chartboost * ShouldRequestInterstitialsInFirstSession is no longer used --> After init sdk add [Chartboost setShouldRequestInterstitialsInFirstSession:YES]; <Reference> https://answers.chartboost.com/hc/en-us/articles/201382909

[Ios][xcode]

이미지
<Error Message> : "_CTFontManagerRegisterFontsForURL", referenced from: <Solution> Add CoreText.framework framework to your framework. <Reference>

[IOS][Xcode] : "_SecPolicyCreateSSL", referenced from:

이미지
<Error Message> : "_SecPolicyCreateSSL", referenced from: : "_SecTrustSetPolicies", referenced from: : "_SecCertificateCopyData", referenced from: : "_SecTrustGetCertificateCount", referenced from: : "_SecTrustGetCertificateAtIndex", referenced from: : "_SecCertificateCreateWithData", referenced from: : "_SecTrustCopyPublicKey", referenced from: : "_SecTrustSetAnchorCertificates", referenced from: : "_SecPolicyCreateBasicX509", referenced from: : "_SecTrustCreateWithCertificates", referenced from: : "_SecTrustEvaluate", referenced from: : "_CTFontManagerRegisterFontsForURL", referenced from: <Solution> Add  Security.framework to your link framework. <Reference>

[IOS][Xcode] "_OBJC_CLASS_$_CLLocationManager", referenced from:

이미지
<Problem> After adding revmob sdk , when i building a source this error message show up. <Solution> Add CoreLocation framework <Reference>

cocos2d: ERROR: 0:12: '' : syntax error: #extension must always be before any non-preprocessor tokens

<Problem> cocos2d: ERROR: 0:12: '' : <Solution> If you are using an older release of Cocos 2D, this may help. I edited CCGLProgram.m  to change the beginning of the -(BOOL)compileShader: method thusly: #define EXTENSION_STRING "#extension GL_OES_standard_derivatives : enable" static NSString * g_extensionStr = @EXTENSION_STRING ; - ( BOOL ) compileShader :( GLuint *) shader type :( GLenum ) type byteArray :( const GLchar *) source { GLint status ; if (! source ) return NO ; // BEGIN workaround for Xcode 7 bug BOOL hasExtension = NO ; NSString * sourceStr = [ NSString stringWithUTF8String : source ]; if ([ sourceStr rangeOfString : g_extensionStr ]. location != NSNotFound ) { hasExtension = YES ; NSArray * strs = [ sourceStr componentsSeparatedByString : g_extensionStr ]; assert ( strs . count == 2 ); sourceStr = [ strs componentsJoinedByString :@ ...

Cannot create __weak reference in file using manual reference counting

이미지
<Problem> When i build a source code a build error show up.  "Cannot create __weak reference in file using manual reference counting" <Solution> Set Build Settings -> Apple LLVM 7.1 - Language - Objective C -> Weak References in Manual Retain Release to YES.