Lines Matching refs:data
210 def save_multiple_dim_array_in_txt(self, file, data): argument
211 header = ','.join(map(str, data.shape))
212 np.savetxt(file, data.reshape(-1, data.shape[-1]), header=header, delimiter=',')
217 data = np.genfromtxt(f, delimiter=',').reshape(shape)
218 return data.astype(np.float32)
258 …data = tf.Variable(tf.random.uniform(dims, minval=minrange, maxval=maxrange, dtype=tf.dtypes.int64…
259 data = tf.cast(data, dtype=tf.float32)
261 …data = tf.Variable(tf.random.uniform(dims, minval=minrange, maxval=maxrange, dtype=tf.dtypes.float…
262 data = np.around(data.numpy(), decimals)
263 data = tf.convert_to_tensor(data)
266 self.save_multiple_dim_array_in_txt(npfile, data.numpy())
269 data = tf.convert_to_tensor(self.load_multiple_dim_array_from_txt(npfile))
270 return data
519 data = in_file.read()
521 data = data.replace(item, str(to_replace))
523 data = json.loads(data)
528 … data["buffers"][w_1_buffer_index]["data"] = self.to_bytes(weights_feature_data.numpy().ravel(), 1)
532 … data["buffers"][w_2_buffer_index]["data"] = self.to_bytes(weights_time_data.numpy().ravel(), 1)
534 … data["buffers"][w_2_buffer_index]["data"] = self.to_bytes(weights_time_data.numpy().ravel(), 2)
538 … data["buffers"][bias_buffer_index]["data"] = self.to_bytes(bias_data.numpy().ravel(), 4)
540 json.dump(data, out_file, indent=2)