boost 1.34 终于简化了内嵌python的支持

Ubuntu 20.04 Python环境搭建:conda、pyenv与系统Python协同方案 Python环境管理是Linux开发的基础能力,其核心在于理解解释器、包管理器与路径机制的协同原理。在Ubuntu 20.04中,系统Python深度绑定APT工具链,直接使用sudo pip或混用conda/pyenv易引发ABI冲突、PATH错配与apt_pkg异常等稳定性风险。掌握conda create -n pytorch_env python=3.9等命令背后的依赖解析、二进制兼容性校验与环境隔离逻辑,可有效支撑AI开发、数据科学及多版本项目并行需求。本文聚焦Ubuntu 20.04这一广泛使用 阅读详情
  boost 1.34 终于简化了内嵌python的支持
boost 1.34 终于简化了内嵌python的支持。
还支持了python2.5。
在中文windows下用vc8编译boost的过程中,虽然仍有代码页字符警告,但是可以正常编译成功,不再象1.33.1那样造成正则表达式库不修改源码不能够编译通过的问题了。

下面的例子是从boost文档中来的:
#include  < iostream >
#include 
< string >
#include 
< boost / python.hpp >
#include 
< boost / ref .hpp >
#include 
< vector >
using   namespace  boost::python;

void  greet()
{
    
object  main  =  import( " __main__ " );
    
object  global(main.attr( " __dict__ " ));

    
//  Define greet function in Python.
     object  result  =  exec(
        
" def greet(a):               /n "
        
"    return 'Hello %s from Python!' % a /n " ,
        global, global);

    
object  greet  =  global[ " greet " ];

    list lst;
    lst.append(
1 );
    lst.append(
2 );

    
object  r  =  greet(lst);

    std::
string  message  =  extract < std:: string > (r);
    std::cout 
<<  message  <<  std::endl;
}

int  _tmain( int  argc, _TCHAR *  argv[])
{
    Py_Initialize();
    greet();
    system(
" Pause " );
    
return   0 ;
}
MPA模型:端到端自动驾驶的在线策略自适应新范式 端到端自动驾驶模型长期面临泛化性差、鲁棒性弱、部署后无法动态适配真实长尾场景的核心瓶颈。其本质在于策略被静态编码于权重中,缺乏对环境扰动的感知-响应闭环机制。MPA(Model-based Policy Adaptation)提出一种新型‘模型内闭环’架构,将策略定义为可微分的动态特征重加权过程,通过环境原型向量(EPV)与策略元网络(PMN)协同建模扰动敏感度与调节逻辑,在单次前向传播中完成策略参数的在线重校准。该技术不依赖外部优化器或重新训练,显著提升雨雾夜等OOD场景下的转向稳定性与决策一致性,为车载 阅读详情

相关推荐

Jupyter生产力操作系统:从交互式笔记本到可复现计算流

Jupyter Notebook 本质不是轻量IDE,而是面向数据科学的‘计算流编排器’——它通过单元格实现分段计算、状态隔离与结果可追溯。理解命令模式(Command Mode)、Kernel状态管理、参数化执行(papermill)和结构化输出(nbconvert)四大核心原理,能显著提升交互式开发的确定性与协作效率。尤其在金融风控、电商用户分群等需高频迭代与跨团队复现的场景中,规范化的单元格命名、%reset_selective变量清理、pathlib路径治理等硬核实践,直接降低调试耗时63%、协作冲

cong84596496的博客 321

link_struct* CGMToolDlg::ParsePacketOneLink(link_struct* pLinkHead)

link_struct* CGMToolDlg::ParsePacketOneLink(link_struct* pLinkHead) { if(pLinkHead == NULL)                     return NULL; int nRecv = 0; bool bIsParse = false; link_struct* pNewNode = NULL;

犀利虫的专栏 731

绝缘体上硅(SOI) vs 传统硅片:5个关键性能对比及适用场景分析

本文深入对比了绝缘体上硅(SOI)与传统硅片在功耗、速度、隔离性等5个关键性能维度的差异,并分析了各自适用场景。SOI技术凭借其独特的埋氧层结构,在低功耗、高频应用和极端环境下展现出显著优势,特别适合移动设备、汽车电子和航天应用。

weixin_30335575的博客 562

硬件工程师全栈实战指南

《硬件工程师全栈手册》是一本涵盖硬件设计核心领域的实用指南,内容包含元器件选型、电路设计、PCB规范、信号完整性等关键知识点。

qq_43709190的博客 6584

告别“单打独斗”:Oh My Open Code 如何用多模型协作重塑 AI 编程范式

介绍"Oh My OpenCode"——一个能协调多个专业AI模型完成复杂开发任务的智能编程框架。您将看到它如何分配任务、发挥不同模型的独特优势,并通过并行处理和实时纠错等功能解决AI编程流程中的常见痛点。

老孙 | Ethan Sun 的博客:AI 智能体与 AI 原生软件的工程实践 4225

Pytorch版deeplabv3+环境配置训练自己的数据集

参考:https://blog.csdn.net/qq_36766560/article/details/110009622?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161594607816780266214828%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=161594607816780266214828

Ring__Rain的博客 1万+

PointAction:基于4D对齐点云与RGB的动作生成范式

点云与RGB融合是具身智能感知的基础技术,其核心在于时空对齐的原理实现与物理一致性保障。传统多模态方法常因时间戳漂移、标定缺失导致动作策略失效,而高精度4D对齐能显著提升机器人在真实场景中的动作泛化性与执行鲁棒性。该技术价值体现在消费级硬件即可支撑毫米级空间理解与亚秒级响应闭环,广泛应用于工业示教、服务机器人避障及高校具身智能实验。PointAction正是这一范式的工程落地代表,聚焦RGB-XYZ逐帧时间同步、跨模态联合标定与点云运动场解码。

weixin_30856725的博客 424

“基于车载车机 ADB 的安卓自动化测试”以及“类似智谱 AutoGLM 的 AI 安卓自动化项目”的整理和选型建议。

本文系统梳理了安卓自动化测试两大路线。传统ADB框架中,**Appium**适用于企业级测试,**AndroidViewClient**和**Airtest**适合脚本化与图像识别场景。AI驱动的方案里,**智谱Open-AutoGLM**擅长中文场景的视觉理解与操作,**DroidRun**支持多模型与跨平台,而**Android-MCP**则适合将安卓能力作为工具集成到现有AI平台。选型需根据稳定性、技术栈与AI集成需求决定。

weixin_39072720的博客 910

如何快糙好猛地在Windows下编译CAFFE并使用其matlab和python接口

零、最近更新 2015/07/07 抱歉最近比较忙,留言看得比较少,如果有问题请加 QQ群:Deep Learning高质量群 209306058,会有各路大神回答你的问题。  2015/07/07 现在caffe也支持VS2013了,第三方库全部更新至最新版本。请从http://pan.baidu.com/s/1sj3IvzZ 下载并替换掉原有的build文件夹,其他步骤与先前版本一致。如果

lien0906的专栏 9443

ABB机器人C#二次开发实战:从通信打通到数据读写的落地指南(附完整工程)

最近在做自动化产线升级项目时,遇到一个核心需求:用C#上位机实时读取ABB机器人的关节角度、IO信号,同时下发运动指令和参数配置。翻遍全网,要么是Robot Studio的基础操作教程,要么是C++/VC++的老旧案例,C#相关的实操内容要么只给片段代码,要么跳过通信配置、权限设置等关键步骤,导致刚上手时踩了无数坑——连接超时、数据读不到、写入无响应,甚至误触发机器人安全保护。

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 1417

微信小程序 - 最新详细实现气泡菜单功能,点击任意元素在底部或附近周围弹出气泡菜单列表,仿微信气泡弹框显示菜单快捷功能收纳,自定义气泡弹窗/菜单气泡弹窗,小程序气泡框嵌套菜单组件插件,自动计算弹出定位

微信小程序,vue2,vue3,气泡列表,汽泡菜单,气泡框,泡泡框,悬浮框,悬浮菜单,点击菜单按钮弹出气泡,对话箭头气泡框,弹出的气泡准确定位并吸附在附近,弹出式气泡,弹窗菜单,气泡自定义HTML弹窗,带三角的气泡弹框,三角气泡框里面嵌套菜单,当点击一个按钮或元素时,会从附近弹出一个小气泡一样的菜单列表,自定义气泡框内的内容,点击一个元素在附近弹出一个气泡弹框功能效果,气泡弹框不准怎么办,被盖住了,挡住了,长按弹出,组件插件,微信,自定义气泡菜单组件,气泡弹出框,小程序自定义气泡框,菜单气泡,包裹列表的三角

🏆 前端领域优质创作者 3934

Caffe-error

13>_caffe.obj : error LNK2001: 无法解析的外部符号 "struct _object * __cdecl boost::python::detail::init_modul ==> 1.将python安装目录下libs目录里的python27复制一份并命名为python27_d.lib 2.修改include目录下的pyconfig.h,用 // 将 ...

秀呀秀的博客 422

Oracle EBS Interface/API(29) - AP发票API

续上编文章《Oracle EBS Interface/API(28) - 客制化开发AP付款API》背景,介绍如调用官方提供标准AP发票API调用 用户界面 Invoices(Payables Manager->Invoices->Entry->Invoices) Open Interface Invoices(Payables Manager->Invoices->Entry->Open Interface Invoices) 快速参考 参考点 内容.

陈显平的专栏-Oracle EBS 1159

无法解析的外部符号 "class boost::system::error_category const & __cdecl boost::system::system_category(void)

error LNK2019: 无法解析的外部符号 "class boost::system::error_category const & __cdecl boost::system::system_category(void)" 解决: X86与X64库不匹配引起的,需要编译一个对应版本的库。 我的boost库是x64的,开发环境是VS2010,所以开发平台也要设置为x64。

木棉花开时,凤凰涅槃日! 7041

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

python 环境配置问题记录

之前系统中python配置的比较乱,多个python版本以后,有些工程就出问题了,记录一下。 系统里三个python版本: 1、sudo python Python 2.7.12 (default, Nov 12 2018, 14:36:49) 2、python Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:3...

Bankeey的博客 449

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

boost python错误_艰苦的编译boost python (失败)

1.下载 boost_1_67_02.在目录下执行bootstrap3.将python36添加到path环境变量4.执行 b2 --with-python,将会声场如下dll2018/04/17 23:27 6,244,996 libboost_numpy36-vc141-mt-gd-x32-1_67.lib2018/04/17 23:29 6,466,770 libboost...

weixin_31236101的博客 592

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 开源的优秀编辑器SCITE收藏
下一篇: Lua脚本语法说明(修订)
skyremember
博客等级 码龄20年 205粉丝 484原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址