valueerror

tensorflow :ValueError: GraphDef cannot be larger than 2GB

倖福魔咒の 提交于 2019-12-11 19:32:26
问题 I want to run tensorflow code as follows: # Construct graph g = Graph("train"); print("Graph loaded") # Start session sv = tf.train.Supervisor(graph=g.graph,logdir="/workspace",save_model_secs=0) with sv.managed_session() as sess: for epoch in range(1, 10): if sv.should_stop(): break for step in tqdm(range(g.num_batch), total=g.num_batch, ncols=70, leave=False, unit='b'): sess.run(g.train_op) after wait a long time,the console hints me the error: ValueError: GraphDef cannot be larger than 2GB

ValueError: invalid literal for int() with base 10: 'f'

自闭症网瘾萝莉.ら 提交于 2019-12-11 16:26:27
问题 I have been trying to iterate through text files to create some text files with the same name in other directory, but with other values. Here is the code import numpy as np import cv2, os from glob import glob path_in = 'C:/Users/user/labels' path_out = 'C:/Users/user/labels_90' for filename in os.listdir(path_in): if filename.endswith('txt'): filename_edited = [] for line in filename: numericdata = line.split(' ') numbers = [] for i in numericdata: numbers.append(int(i)) c,x,y = numbers

ValueError: X.shape[1] = 1 should be equal to 14, the number of features at training time

风流意气都作罢 提交于 2019-12-11 15:38:02
问题 I am trying to predict boston housingdata by using SVR and I am using the following code but getting some error. # -*- coding: utf-8 -*- import sys import pandas as pd columns=['ID','crim','zn','indus','chas','nox','rm','age','dis','rad','tax','ptratio','black','lstat','medv'] dataset_train=pd.read_csv('train.csv')#,names=columns) train_y=pd.DataFrame(dataset_train.medv) dataset_train=dataset_train.drop('medv',axis=1) columns_test=['ID','crim','zn','indus','chas','nox','rm','age','dis','rad',

Why do I get, ValueError: two properties with same name when I try to access .ply files using plyfile API?

烈酒焚心 提交于 2019-12-11 14:31:40
问题 I am working with a project that requires accessing point cloud data in the form of .ply files and converting them into numpy arrays for running a deep learning algorithm. When I try to access my .ply files from my directory, I get the error "ValueError: two properties with same name" The following is my code - import glob import numpy as np from plyfile import PlyData, PlyElement arr = np.array([]) for filepath in glob.iglob('/content/drive/My Drive/PLY Files/*.ply'): plyFile = PlyData.read

ValueError in TensorFlow

与世无争的帅哥 提交于 2019-12-11 09:10:25
问题 So I ran into some problems with TensorFlow when running this line of code: history = model.fit(X, y, batch_size=32, epochs=40, validation_split=0.1) The Traceback is as follows: Traceback (most recent call last): File "cnnmodel.py", line 71, in <module> history = model.fit(X, y, batch_size=32, epochs=40, validation_split=0.1) File "C:\Users\couch\PyMOL\envs\test\lib\site-packages\tensorflow_core\python\keras\engine\training.py", line 728, in fit use_multiprocessing=use_multiprocessing) File

Creating a dataframe of Shapely polygons gives “ValueError: A LinearRing must have at least 3 coordinate tuples”

守給你的承諾、 提交于 2019-12-11 05:48:30
问题 I want to create a heatmap of say, provincial population of China and I found this guide to a similar problem here. I have no problem going through the example code though I have to admit that I don't thoroughly understand them all. However when I was trying to mimic the example by using the shapefile of China, the code ran ok till the following df_map = pd.DataFrame({ 'poly': [Polygon(xy) for xy in m.china], 'ward_name': [ward['NAME'] for ward in m.china_info]}) It generates an error that

AttributeError when using callback Tensorboard on Keras: 'Model' object has no attribute 'run_eagerly'

心不动则不痛 提交于 2019-12-10 22:47:18
问题 I have built a model using the functional API from Keras, and when I am adding the tensorboard instance to my callbacks in my model.fit() function, it throws an Error: "AttributeError: 'Model' object has no attribute 'run_eagerly'" The Model class does indeed not have an attribute run_eagerly, but in the Keras doc, it says that it can be passed as parameter to the model.compile() function. This returns "ValueError: ('Some keys in session_kwargs are not supported at this time: %s', dict_keys([

remove rows and ValueError Arrays were different lengths

本小妞迷上赌 提交于 2019-12-10 16:17:17
问题 My dataframe has subcategory, under each category ( cat , dog , bird ), stats information is presented. I need to remove the rows if they contain info in count and freq , and only keep rows with sd and mean values. Some values are NaN . ValueError occurs in my codes. df: var stats A B C cat mean 2 3 4 NaN sd 2 1 3 NaN count 5 2 6 NaN freq 3 1 19 dog mean 8 1 2 NaN sd 2 1 3 NaN count 4 6 1 NaN freq 3 1 19 bird mean 2 3 4 NaN sd 2 1 3 NaN count 5 2 6 NaN freq NaN NaN NaN My codes: rows = [

Access specifics of ValueError in pandas.read_excel() converters

社会主义新天地 提交于 2019-12-08 12:52:44
问题 I'm using the following to ensure a dataframe column has the correct data type before I proceed with operations: >>> cfun = lambda x: float(x) >>> df = pd.read_excel(xl, converters={'column1': cfun}) Using converters instead of dtype so that the traceback will tell me explicitly what value caused the issue: ValueError: could not convert string to float: '100%' What I would like to do is take that information (that the string "100%" was the problem) and tell the user where it occurred in the

ValueError: Unknown label type: 'continuous'

谁都会走 提交于 2019-12-07 00:48:28
问题 I've seen other posts talking about this but anyone of these can help me. I am using jupyter notebook with Python 3.6.0 on windows x6 machine. I have a large dataset but I keep only a piece of it to run my models: This is a piece of code that i used: df = loan_2.reindex(columns= ['term_clean','grade_clean', 'annual_inc', 'loan_amnt', 'int_rate','purpose_clean','installment','loan_status_clean']) df.fillna(method= 'ffill').astype(int) from sklearn.preprocessing import Imputer from sklearn