加入新推出的
Discord 社区,展开实时讨论,获得同行支持,并直接与 Meridian 团队互动!
মডেল অবজেক্টটি সংরক্ষণ করুন এবং লোড করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
মডেল চালানোর পরে, আমরা ভবিষ্যতে ব্যবহারের জন্য মডেল অবজেক্ট সংরক্ষণ করার পরামর্শ দিই। এটি আপনাকে পুনরাবৃত্তিমূলক মডেল রান এড়াতে সাহায্য করে এবং সময় এবং গণনামূলক সংস্থান সংরক্ষণ করে। মডেল অবজেক্টটি সংরক্ষণ করার পরে, মডেলটিকে পুনরায় চালানো ছাড়াই বিশ্লেষণ বা ভিজ্যুয়ালাইজেশন চালিয়ে যেতে পরবর্তী পর্যায়ে অবজেক্টটি লোড করা যেতে পারে।
মডেল অবজেক্ট সংরক্ষণ করুন
মডেল অবজেক্ট সংরক্ষণ করতে নিম্নলিখিত কমান্ড চালান:
file_path = f'{PATH}/{FILENAME}.pkl'
model.save_mmm(meridian, file_path)
কোথায়:
-
PATH
হল ফাইলের অবস্থানের পথ। -
FILENAME
হল ফাইলটির নাম। এটির একটি PKL এক্সটেনশন থাকতে হবে।
মডেল অবজেক্ট লোড করুন
সংরক্ষিত মডেলটি লোড করতে নিম্নলিখিত কমান্ডটি চালান:
file_path = f'{PATH}/{FILENAME}.pkl'
meridian=model.load_mmm(file_path)
কোথায়:
-
PATH
হল ফাইলের অবস্থানের পথ। -
FILENAME
হল ফাইলটির নাম। এটির একটি PKL এক্সটেনশন থাকতে হবে।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-01-24 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-01-24 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eSaving the model object after a run is recommended to prevent repetitive runs and conserve resources.\u003c/p\u003e\n"],["\u003cp\u003eA saved model object can be loaded later for continued analysis or visualizations without needing to re-run the model.\u003c/p\u003e\n"],["\u003cp\u003eTo save the model, use the \u003ccode\u003emodel.save_mmm(meridian, file_path)\u003c/code\u003e command, where \u003ccode\u003efile_path\u003c/code\u003e includes the \u003ccode\u003ePATH\u003c/code\u003e and a \u003ccode\u003eFILENAME\u003c/code\u003e with a PKL extension.\u003c/p\u003e\n"],["\u003cp\u003eTo load a previously saved model, use the \u003ccode\u003emodel.load_mmm(file_path)\u003c/code\u003e command, where \u003ccode\u003efile_path\u003c/code\u003e includes the \u003ccode\u003ePATH\u003c/code\u003e and a \u003ccode\u003eFILENAME\u003c/code\u003e with a PKL extension.\u003c/p\u003e\n"]]],[],null,["# Save and load the model object\n\nAfter executing the model run, we recommend saving the model object for future\nuse. This helps you avoid repetitive model runs, and saves time and\ncomputational resources. After the model object is saved, the object can be\nloaded at a later stage to continue the analysis or visualizations without\nhaving to re-run the model.\n\nSave the model object\n---------------------\n\nRun the following command to save the model object: \n\n file_path = f'{PATH}/{FILENAME}.pkl'\n model.save_mmm(meridian, file_path)\n\nWhere:\n\n- `PATH` is the path to the file location.\n- `FILENAME` is the name of the file. It must have a PKL extension.\n\nLoad the model object\n---------------------\n\nRun the following command to load the saved model: \n\n file_path = f'{PATH}/{FILENAME}.pkl'\n meridian=model.load_mmm(file_path)\n\nWhere:\n\n- `PATH` is the path to the file location.\n- `FILENAME` is the name of the file. It must have a PKL extension."]]