반응형 colab environment1 구글 코랩(google colab) 환경인지 아닌지 확인하는 방법 다음은 자연어 모델 학습을 위한 기본 환경 설정이다. 해당 코드를 jupyter notebook 상단에 실행하면 COLAB / PC 환경을 확인, COLAB일 경우 구글드라이브 연동 및 라이브러리 체크와 설치, PC일 경우 라이브러리 체크 및 설치를 진행하며, GPU 가 있는 경우를 가정하여 torch 환경을 설치함 # 자연어 처리 환경 requirements # colab try: import google.colab IN_COLAB = True except: IN_COLAB = False # print(IN_COLAB) if IN_COLAB: # google drive setting from google.colab import drive drive.mount('/content/drive') import.. Tools & Tips/code_snippets 2022. 9. 14. 이전 1 다음 💲 Google Ads. 반응형