Skip to content

Instantly share code, notes, and snippets.

Avatar
🦥

Nitish Gopinath ngmars

🦥
View GitHub Profile
View poolStarmap.py
import joblib
import multiprocessing as mp
from joblib import load
#add the path of the file you wish to load
filename= './new_model.sav'
#your models weights are now stored in the variable loaded model
loaded_model = load("new_model.sav")
#define a function and pass your parameters
View poolApply.py
import joblib
import multiprocessing as mp
from joblib import load
#add the path of the file you wish to load
filename= './new_model.sav'
#your models weights are now stored in the variable loaded model
loaded_model = load("new_model.sav")
#define a function and pass your parameters
View poolMap.py
import joblib
import multiprocessing as mp
clf.fit(y_train, X_train)
weight = 'new_model.sav'
joblib.dump(clf, weight)
#define a function and pass your parameters
def predict(A):
View createFunction.py
import joblib
clf.fit(y_train, X_train)
weight = 'new_model.sav'
joblib.dump(clf, weight)
#define a function and pass your parameters
def predict(A,B,C):
arr=[A,B,C]
y_test=[arr]
y_test=np.asarray(y_test)
View JoblibImport.py
from joblib import load
#add the path of the file you wish to load
filename= './new_model.sav'
#your models weights are now stored in the variable loaded model
loaded_model = load("new_model.sav")
@ngmars
ngmars / weightSave.py
Last active Nov 21, 2020
saving weights as a .h5 file
View weightSave.py
import joblib
#fitting the clf variable to the training data
clf.fit(y_train, X_train)
#saving weights into a .sav file
weight = 'new_model.sav'
joblib.dump(clf, weight)
You can’t perform that action at this time.