با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
اگر یک توسعهدهنده ML با تجربه هستید و کتابخانه TensorFlow Lite از پیش ساخته شده نیازهای شما را برآورده نمیکند، میتوانید از یک ساخت سفارشی TensorFlow Lite با کیت ML استفاده کنید. به عنوان مثال، ممکن است بخواهید عملیات سفارشی را اضافه کنید.
چارچوب تولید شده را می توان در tensorflow/lite/gen/ios_frameworks/tensorflow_lite.framework.zip یافت
ایجاد یک غلاف محلی
یک دایرکتوری برای پاد محلی خود ایجاد کنید
pod lib create TensorFlowLite در دایرکتوری که ایجاد کردید اجرا کنید
یک دایرکتوری Frameworks در دایرکتوری TensorFlowLite ایجاد کنید
فایل tensorflow_lite.framework.zip ایجاد شده در بالا را از حالت فشرده خارج کنید
tensorflow_lite.framework زیپ نشده را در TensorFlowLite/Frameworks کپی کنید
TensorFlowLite/TensorFlowLite.podspec ایجاد شده را برای ارجاع به کتابخانه تغییر دهید:
Pod::Spec.newdo|s|s.name='TensorFlowLite's.version='0.1.7'# Version must match.s.ios.deployment_target='9.0'# ... make other changes as desiredinternal_pod_root=Pathname.pwds.frameworks='Accelerate's.libraries='c++'s.vendored_frameworks='Frameworks/tensorflow_lite.framework's.pod_target_xcconfig={'SWIFT_VERSION'=>'4.0','INTERNAL_POD_ROOT'=>"#{internal_pod_root}",'HEADER_SEARCH_PATHS'=>"$(inherited) '${INTERNAL_POD_ROOT}/Frameworks/tensorflow_lite.framework/Headers'",'OTHER_LDFLAGS'=>"-force_load '${INTERNAL_POD_ROOT}/Frameworks/tensorflow_lite.framework/tensorflow_lite'"}end
ارجاع به غلاف سفارشی در پروژه شما
می توانید با ارجاع مستقیم به آن از Podfile برنامه خود، پاد سفارشی را اضافه کنید:
pod 'Firebase/MLModelInterpreter'
pod 'TensorFlowLite', :path => 'path/to/your/TensorflowLite'
برای سایر گزینهها برای مدیریت غلافهای خصوصی، Private Pods را در مستندات Cocoapods ببینید. توجه داشته باشید که نسخه باید دقیقاً مطابقت داشته باشد، و شما باید در هنگام گنجاندن پاد از مخزن خصوصی خود، به عنوان مثال pod 'TensorFlowLite', "1.10.1" به این نسخه مراجعه کنید.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[],[],null,["\u003cbr /\u003e\n\nIf you're an experienced ML developer and the pre-built TensorFlow Lite\nlibrary doesn't meet your needs, you can use a custom\n[TensorFlow Lite](//www.tensorflow.org/mobile/tflite/) build with ML Kit. For\nexample, you may want to add custom ops.\n\nPrerequisites\n\n- A working [TensorFlow Lite](//github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/README.md#building-tensorflow-lite-and-the-demo-app-from-source) build environment\n- A checkout of TensorFlow Lite 1.10.1\n\nYou can check out the correct version using Git: \n\n git checkout -b work\n git reset --hard tflite-v1.10.1\n git cherry-pick 4dcfddc5d12018a5a0fdca652b9221ed95e9eb23\n\nBuilding the Tensorflow Lite library\n\n1. Build Tensorflow Lite (with your modifications) following the [standard instructions](//github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/guide/build_ios.md)\n2. Build the framework:\n\n```\ntensorflow/lite/lib_package/create_ios_frameworks.sh\n```\n\nThe generated framework can be found at `tensorflow/lite/gen/ios_frameworks/tensorflow_lite.framework.zip`\n| **Note:** There have been [build issues\n| reported](https://github.com/tensorflow/tensorflow/issues/18356) with Xcode 9.3\n\nCreating a local pod\n\n1. Create a directory for your local pod\n2. Run `pod lib create TensorFlowLite` in the directory you created\n3. Create a `Frameworks` directory inside the `TensorFlowLite` directory\n4. Unzip the `tensorflow_lite.framework.zip` file generated above\n5. Copy the unzipped `tensorflow_lite.framework` to `TensorFlowLite/Frameworks`\n6. Modify the generated `TensorFlowLite/TensorFlowLite.podspec` to reference the library:\n\n Pod::Spec.new do |s|\n s.name = 'TensorFlowLite'\n s.version = '0.1.7' # Version must match.\n s.ios.deployment_target = '9.0'\n \n # ... make other changes as desired\n \n internal_pod_root = Pathname.pwd\n s.frameworks = 'Accelerate'\n s.libraries = 'c++'\n s.vendored_frameworks = 'Frameworks/tensorflow_lite.framework'\n\n s.pod_target_xcconfig = {\n 'SWIFT_VERSION' =\u003e '4.0',\n 'INTERNAL_POD_ROOT' =\u003e \"#{internal_pod_root}\",\n 'HEADER_SEARCH_PATHS' =\u003e \"$(inherited) '${INTERNAL_POD_ROOT}/Frameworks/tensorflow_lite.framework/Headers'\",\n 'OTHER_LDFLAGS' =\u003e \"-force_load '${INTERNAL_POD_ROOT}/Frameworks/tensorflow_lite.framework/tensorflow_lite'\"\n }\n end\n\nReferencing the custom pod in your project\n\nYou can include the custom pod by referencing it directly from your app's\n`Podfile`: \n\n pod 'Firebase/MLModelInterpreter'\n pod 'TensorFlowLite', :path =\u003e 'path/to/your/TensorflowLite'\n\nFor other options for managing private pods, see\n[Private Pods](https://guides.cocoapods.org/making/private-cocoapods.html) in\nthe Cocoapods documentation. Note that the version must exactly match, and you\nshould reference this version when including the pod from your\nprivate repository, e.g. `pod 'TensorFlowLite', \"1.10.1\"`."]]