소스 검색

Check CoreML models.train() mode (#3262)

* Check CoreML models.train() mode

* Update export.py
modifyDataloader
Glenn Jocher GitHub 3 년 전
부모
커밋
7b36e38cf8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. +1
    -0
      models/export.py

+ 1
- 0
models/export.py 파일 보기

@@ -131,6 +131,7 @@ if __name__ == '__main__':
import coremltools as ct

print(f'{prefix} starting export with coremltools {ct.__version__}...')
assert opt.train, 'CoreML exports should be placed in model.train() mode with `python export.py --train`'
model = ct.convert(ts, inputs=[ct.ImageType('image', shape=img.shape, scale=1 / 255.0, bias=[0, 0, 0])])
f = opt.weights.replace('.pt', '.mlmodel') # filename
model.save(f)

Loading…
취소
저장