hollance / Forge

A neural network toolkit for Metal
MIT License
1.27k stars 173 forks source link

Slicing and Assigning Tensor forge #16

Closed jordanhart closed 7 years ago

jordanhart commented 7 years ago

Hi!

Is there anyway to slice a tensor in forge? Or use an array as the input tensor values?

Thank you so much!

hollance commented 7 years ago

What exactly are you trying to accomplish?

A tensor in Forge is just a placeholder for an MPSImage, and MPSImages have some restrictions on how to use them (to keep them fast). So while you may be tempted to slice a tensor in a tool like TensorFlow, in Forge/MPS there may be a different way to accomplish what you want.

jordanhart commented 7 years ago

Overall, I am trying to use a squeezedet model on iOS. For this question, I am trying to port the convdet layer (post processing of model output) of squeezedet to this iOS example, defined as "_add_interpretation_graph" here: https://github.com/BichenWuUCB/squeezeDet/blob/master/src/nn_skeleton.py#L142

Without all the activations / training code