def numpy(self): internal_tensor = self._local_or_consistent_tensor if not internal_tensor.is_lazy and not internal_tensor.is_consistent: return _access_blob_by_callback( internal_tensor, lambda ofblob: ofblob.CopyToNdarray(), "const") return remote_blob_util.BlobObjectNumpy(internal_tensor._blob_object)
def numpy(self): parallel_conf = placement_cfg.ParallelConf() parallel_conf.set_device_tag(self.device.type) machine_id = 0 parallel_conf.add_device_name("{}:{}".format(machine_id, self.device.index)) return remote_blob_util.BlobObjectNumpy( self._local_or_consistent_tensor._blob_object, parallel_conf)
def numpy(self): return remote_blob_util.BlobObjectNumpy( self._local_or_consistent_tensor._blob_object)
def numpy(self): internal_tensor = self._local_or_consistent_tensor if not internal_tensor.is_lazy and not internal_tensor.is_consistent: return _local_tensor_numpy(internal_tensor) return remote_blob_util.BlobObjectNumpy(internal_tensor._blob_object)