matlab unsqueeze
时间: 2023-11-02 15:23:08 浏览: 387
Matlab中没有像numpy和PyTorch中的unsqueeze()函数,用于增加维度。相反,Matlab可以直接通过赋值来扩展维度。例如,对于一个三维数组data,可以使用data_stack(0, :, :, :) = data(:, :, :)来将其拓展为四维。这样做无需额外的扩维操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Matlab 堆叠张量](https://blog.csdn.net/qq_44458671/article/details/130650481)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [pytorch中squeeze()和unsqueeze()函数介绍;MATLAB中的squeeze()](https://blog.csdn.net/qq_41207924/article/details/113361099)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文