• 카테고리

    질문 & 답변
  • 세부 분야

    자연어 처리

  • 해결 여부

    미해결

torchtext.data 에러

22.11.17 17:25 작성 조회수 1.56k

0

안녕하세요. 강사님. torchtext 모듈 import간 에러가 나타나 문의합니다.

섹션 2 sequence Tagging 실습편의 코드를 연습하던 중 load_dataset() 함수를 불러올 때 다음과 같이 AttributeError: module 'torchtext.data' has no attribute 'Field' 라는 에러가 출력됩니다. 찾아보니 torchtext의 버전문제로 현재 최신버전에서는 torchtext.legacy로 import를 사용해야한다고 합니다만 그럴 경우 ImportError: cannot import name 'unicode_csv_reader' from 'torchtext.utils'라는 에러가 출력되어 어떻게 해결해야할지 궁금합니다.

실습환경: 코랩

운영체제: 우분투 18.04

해당 에러 관련 사이트 링크: https://stackoverflow.com/questions/66516388/attributeerror-module-torchtext-data-has-no-attribute-field

답변 0

답변을 작성해보세요.

답변을 기다리고 있는 질문이에요.
첫번째 답변을 남겨보세요!