Skip to content

Instantly share code, notes, and snippets.

View ngmars's full-sized avatar
🦥

Nitish Gopinath ngmars

🦥
View GitHub Profile
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
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
@ngmars
ngmars / poolMap.py
Last active November 22, 2020 08:51
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):
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)
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 November 21, 2020 18:01
saving weights as a .h5 file
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)