Giter Club home page Giter Club logo

Comments (3)

DylanMuir avatar DylanMuir commented on July 21, 2024

This is an issue with an incorrect call to SliceFunction. The arguments are not specified correctly.

from mappedtensor.

marcsous avatar marcsous commented on July 21, 2024

I've been thinking about the plus operator for MappedTensor. It seems there is no advantage of implementing it as an overloaded operator, like there is with multiply (which is a trivial operation). Most operations that require a full load of the tensor should probably be done only as necessary on a portion of the tensor being used at that moment, e.g. a(:,1,2,3)+1.

There seem a couple of interesting paths to me:

  1. Remove the + operator entirely and keep the class as clean as possible.
  2. Implement an eval string that remembers any operations done on the MappedTensor in the right order and applies them at the point they are requested.

So line 451:

tfData = mtVar.fRealFactor .* mt_read_data(mtVar.hShimFunc, mtVar.hRealContent, S, vnReferencedTensorSize, mtVar.strStorageClass, mtVar.nHeaderBytes, mtVar.bBigEndian, mtVar.hRepSumFunc, mtVar.hChunkLengthFunc);

might become a recursive set of feval() function calls done in the right order, e.g. 'minus( divide( plus( times( power( mtVar, A), B), C), D), E)'.

Option 1) is easier and probably the way to go but I can see the merit in 2) as well. The current approach is kind-of in between :)

from mappedtensor.

DylanMuir avatar DylanMuir commented on July 21, 2024

Yeah, I'm thinking that the plus method isn't so useful. I agree with your point, that anything requiring a full load of the tensor should be performed on a referenced portion. I'll change it to raise an error.

from mappedtensor.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.