I have a React Server Side Rendering App. There's a performance issue when images are to be displayed on the page. For an image to be displayed, there's a network call for the image from the server and then it's displayed on screen. For larger images, it takes a while to load the image which is very evident. Is there a way once the request is made to the server and the image is received as response to have the image stored locally and use the locally stored image when needed again without making a network request. I couldn't find any good resource to help me through this one, it would be of great help if you could help me with this one or even point me to a reference!
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
So, I am trying to predict the model but its throwing error like it has 10 features but it expacts only 1. So I am confused can anyone help me with it? more importantly its not working for me when my friend runs it. It works perfectly fine dose anyone know the reason about it? cv = KFold(n_splits = 10) all_loss = [] for i in range(9): # 1st for loop over polynomial orders poly_order = i X_train = make_polynomial(x, poly_order) loss_at_order = [] # initiate a set to collect loss for CV for train_index, test_index in cv.split(X_train): print('TRAIN:', train_index, 'TEST:', test_index) X_train_cv, X_test_cv = X_train[train_index], X_test[test_index] t_train_cv, t_test_cv = t[train_index], t[test_index] reg.fit(X_train_cv, t_train_cv) loss_at_order.append(np.mean((t_test_cv - reg.predict(X_test_cv))**2)) # collect loss at fold all_loss.append(np.mean(loss_at_order)) # collect loss at order plt.plot(np.log(al...
Comments
Post a Comment