コード例 #1
0
    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)
コード例 #2
0
 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)
コード例 #3
0
 def numpy(self):
     return remote_blob_util.BlobObjectNumpy(
         self._local_or_consistent_tensor._blob_object)
コード例 #4
0
    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)