Function
-
WGS84 좌표계를 이용하여 거리를 구하는 functionDatabase 2023. 6. 20. 21:55
MSSQL에서 두 좌표간의 거리를 구하는 function을 만들어 보았다. -- ============================================= --WGS84좌표계에서 두 좌표간의 거리 구하기 -- ============================================= alter FUNCTION [dbo].[WGS84_DISTANCE] ( @LAT1 decimal(38, 30), -- 위도 @LNG1 decimal(38, 30), -- 경도 @LAT2 decimal(38, 30), -- 타겟위도 @LNG2 decimal(38, 30) -- 타겟경도 ) RETURNS decimal(38, 30) AS BEGIN RETURN ( 6371.0 * acos(cos( radians( ..
-
Tensorflow 활성함수 activation functions카테고리 없음 2020. 12. 23. 18:23
선형함수 Dense 이외의 함수 모델링시에 선형 비선형 선형 비선형으로 모델링을 하게되는데 선형함수안에 activation='relu' 이런 식으로 정의를 해서 코드를 단순화 할 수 있다. Module: tf.keras.activations Functions deserialize(...): Returns activation function given a string identifier. 문자열 식별자를 받은 활성화 함수를 반환합니다. elu(...): Exponential Linear Unit. 지수 선형 단위. exponential(...): Exponential activation function. 지수 활성화 기능. gelu(...): Applies the Gaussian error linear u..
-
Python 함수 FunctionAI/Python 2020. 12. 18. 13:53
Python의 함수에 대해서 훝어본다. #function def aaaa(a, b): #함수 정의 parameter a c=a+b return c #return 값 #aaaa(input("First number"), input("Second number")) #함수호출 print('This is %d function' %int(aaaa(int(input("First number")), int(input("Second number"))))) 함수에서 형을 구분하지 않아서 input시 str로되기 때문에 형변환을 해줘야 계산을 한다. 형변환을 하지 않으면 str로 구분되어 숫자를 넣어도 두수의 합이 아니라 문자열더하기를 한다. 예를들어 3,4를 입력하면 형변환시 7이지만 형변환을 안하면 34가 나온다. 만약..