Lines Matching refs:np

21 import numpy as np
179 kernel = np.frombuffer(ktensor.tensor_content, dtype=np.float32)
181 kernel = np.transpose(kernel, [3, 0, 1, 2])
184 np.array([self.op2code[node.op], dilation, padding, self.conv_activations[activation], in_channels, out_channels, filter_height, has_bias], dtype=np.uint32).tofile(f)
201 np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
231 kernel = np.float32(ktensor.float_val[0])
233 kernel = np.frombuffer(ktensor.tensor_content, dtype=np.float32)
235 kernel = np.transpose(kernel, [1, 0])
237 np.array([self.op2code[node.op], self.conv_activations[activation], in_channels, out_channels, has_bias], dtype=np.uint32).tofile(f)
252 np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
275 kernel = np.float32(ktensor.float_val[0])
277 kernel = np.frombuffer(ktensor.tensor_content, dtype=np.float32)
279 kernel = np.transpose(kernel, [3, 0, 1, 2])
284 np.array([self.op2code[node.op], dilation, self.conv_paddings[padding], self.conv_activations['None'],
285 in_channels, out_channels, filter_height, has_bias], dtype=np.uint32).tofile(f)
290 np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
297 np.array([self.op2code[node.op], block_size], dtype=np.uint32).tofile(f)
301 np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
309 np.array([self.op2code[node.op], mode], dtype=np.uint32).tofile(f)
317 np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
325 np.array([self.op2code[node.op]], dtype=np.uint32).tofile(f)
326 np.array([y], dtype=np.float32).tofile(f)
330 np.array([input_operand_index, output_operand_index], dtype=np.uint32).tofile(f)
338 np.array([self.op2code['MathBinary'], self.mathbin2code[node.op]], dtype=np.uint32).tofile(f)
341 np.array([1], dtype=np.uint32).tofile(f) # broadcast: 1
342 np.array([scalar], dtype=np.float32).tofile(f)
343 np.array([0], dtype=np.uint32).tofile(f) # broadcast: 0
345 np.array([input_operand_index], dtype=np.uint32).tofile(f)
348 np.array([0], dtype=np.uint32).tofile(f)
350 np.array([input_operand_index], dtype=np.uint32).tofile(f)
351 np.array([1], dtype=np.uint32).tofile(f)
352 np.array([scalar], dtype=np.float32).tofile(f)
354 np.array([0], dtype=np.uint32).tofile(f)
356 np.array([input_operand_index], dtype=np.uint32).tofile(f)
357 np.array([0], dtype=np.uint32).tofile(f)
359 np.array([input_operand_index], dtype=np.uint32).tofile(f)
361 np.array([output_operand_index], dtype=np.uint32).tofile(f)
368 np.array([self.op2code['MathUnary'], self.mathun2code[node.op]], dtype=np.uint32).tofile(f)
370 np.array([input_operand_index], dtype=np.uint32).tofile(f)
372 np.array([output_operand_index],dtype=np.uint32).tofile(f)
398 np.array([self.op2code[node.op], strides, self.pool_paddings[padding], filter_height],
399 dtype=np.uint32).tofile(f)
403 np.array([input_operand_index, output_operand_index],dtype=np.uint32).tofile(f)
447 np.array([operand.index, len(operand.name)], dtype=np.uint32).tofile(f)
449 np.array([operand.iotype, operand.dtype], dtype=np.uint32).tofile(f)
450 np.array(operand.dims, dtype=np.uint32).tofile(f)
456 np.array([header.major, header.minor], dtype=np.uint32).tofile(f)
459 np.array([self.layer_number, len(self.name_operand_dict)], dtype=np.uint32).tofile(f)