개발자 Q&A

개발하다 막혔다면? 여기서 질문하세요! 초보부터 고수까지, 함께 고민하고 해결하는 공간입니다. 누구나 자유롭게 질문하고 답변을 남겨보세요!

2025.06.02 21:36

fann_descale_output 함수 사용 시 오류 발생 원인

목록
  • Azure마스터 2일 전 2025.06.02 21:36
  • 3
    1
제가 현재 fann_descale_output 함수를 사용하여 출력 결과를 스케일링하고 있습니다. 하지만 함수의 사용법을 정확하게 이해하지 못하여 오류가 발생하고 있습니다. fann_descale_output 함수의 인수에 대해 설명해주실 수 있나요?

    댓글목록

    profile_image
    나우호스팅  2일 전



    fann_descale_output 함수는 ANN(신경망) 출력 결과를 스케일링하는 함수입니다. 이 함수의 인수는 다음과 같습니다.

    - net: ANN 네트워크 구조
    - output: ANN 출력 결과
    - scale: 스케일링을 위한 스케일 인수

    이 함수를 사용할 때, 인수 net과 output은 반드시 ANN 네트워크 구조와 출력 결과를 입력해야 합니다. scale 인수는 스케일링을 위한 스케일 인수입니다.

    예를 들어, 다음과 같이 사용할 수 있습니다.

    #hostingforum.kr
    c
    
    #include 
    
    
    
    int main() {
    
        // ANN 네트워크 구조 생성
    
        fann_type *input, *output;
    
        fann_type *scale;
    
        fann *ann = fann_create_standard(3, 2, 2, 1);
    
        fann_set_activation_steepness_hidden(ann, 1.0);
    
        fann_set_activation_steepness_output(ann, 1.0);
    
        fann_set_activation_function_hidden(ann, FANN_SIGMOID_SYMMETRIC);
    
        fann_set_activation_function_output(ann, FANN_SIGMOID_SYMMETRIC);
    
    
    
        // ANN 출력 결과 생성
    
        input = (fann_type*)malloc(2 * sizeof(fann_type));
    
        output = (fann_type*)malloc(1 * sizeof(fann_type));
    
        scale = (fann_type*)malloc(1 * sizeof(fann_type));
    
    
    
        // 스케일링을 위한 스케일 인수 설정
    
        scale[0] = 10.0;
    
    
    
        // ANN 네트워크 구조에 출력 결과 입력
    
        fann_type *calc_out = fann_run(ann, input);
    
    
    
        // ANN 출력 결과 스케일링
    
        fann_descale_output(ann, calc_out, output, scale);
    
    
    
        // 스케일링된 출력 결과 출력
    
        printf("스케일링된 출력 결과: %fn", output[0]);
    
    
    
        // 메모리 해제
    
        free(input);
    
        free(output);
    
        free(scale);
    
        fann_destroy(ann);
    
    
    
        return 0;
    
    }
    
    


    이 예제에서는 ANN 네트워크 구조를 생성하고 출력 결과를 스케일링하는 방법을 보여줍니다.

    2025-06-02 21:37

  • 개발자 Q&A 포인트 정책
      글쓰기
      50P
      댓글
      10P
  • 전체 25,381건 / 7 페이지

검색

게시물 검색